mirror of
https://github.com/phpbb/phpbb.git
synced 2025-07-30 21:40:43 +02:00
Merge pull request #1994 from prototech/ticket/12158
[ticket/12158] The pagination start value should be 0 when there are no items.
This commit is contained in:
@@ -251,7 +251,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;
|
||||
|
Reference in New Issue
Block a user