Commit 095c2362 authored by Taylor Otwell's avatar Taylor Otwell

Fixed empty result set bug in paginator class.

parent c870fdbe
......@@ -93,7 +93,7 @@ class Paginator {
if (is_numeric($page) and $page > $last_page = ceil($total / $per_page))
{
return $last_page;
return ($last_page > 0) ? $last_page : 1;
}
return ($page < 1 or filter_var($page, FILTER_VALIDATE_INT) === false) ? 1 : $page;
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment