aboutsummaryrefslogtreecommitdiffstats
path: root/phpBB/phpbb/pagination.php
diff options
context:
space:
mode:
authorCesar G <prototech91@gmail.com>2014-02-03 12:28:58 -0800
committerCesar G <prototech91@gmail.com>2014-02-03 23:34:22 -0800
commit151c05e92eb5814d492f4739ccf636e7bca4701f (patch)
treefdf02b8ea26da10ac33b124ec24281bb558ff70f /phpBB/phpbb/pagination.php
parent2cc6d03cca3f79125574e0cf938fa9edfab3a7b2 (diff)
downloadforums-151c05e92eb5814d492f4739ccf636e7bca4701f.tar
forums-151c05e92eb5814d492f4739ccf636e7bca4701f.tar.gz
forums-151c05e92eb5814d492f4739ccf636e7bca4701f.tar.bz2
forums-151c05e92eb5814d492f4739ccf636e7bca4701f.tar.xz
forums-151c05e92eb5814d492f4739ccf636e7bca4701f.zip
[ticket/12158] The pagination start value should be 0 when there are no items.
PHPBB3-12158
Diffstat (limited to 'phpBB/phpbb/pagination.php')
-rw-r--r--phpBB/phpbb/pagination.php2
1 files changed, 1 insertions, 1 deletions
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;