From 151c05e92eb5814d492f4739ccf636e7bca4701f Mon Sep 17 00:00:00 2001 From: Cesar G Date: Mon, 3 Feb 2014 12:28:58 -0800 Subject: [ticket/12158] The pagination start value should be 0 when there are no items. PHPBB3-12158 --- phpBB/phpbb/pagination.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'phpBB/phpbb/pagination.php') diff --git a/phpBB/phpbb/pagination.php b/phpBB/phpbb/pagination.php index 467dc2157f..276351d6a7 100644 --- a/phpBB/phpbb/pagination.php +++ b/phpBB/phpbb/pagination.php @@ -262,7 +262,7 @@ class pagination { if ($start < 0 || $start >= $num_items) { - return ($start < 0) ? 0 : floor(($num_items - 1) / $per_page) * $per_page; + return ($start < 0 || $num_items <= 0) ? 0 : floor(($num_items - 1) / $per_page) * $per_page; } return $start; -- cgit v1.2.1