Skip to content
Snippets Groups Projects
Commit 00557cb3 authored by Demian Katz's avatar Demian Katz
Browse files

Fix bug: don't throw error on page 1 with empty result set.

parent b7ab0732
No related merge requests found
...@@ -145,7 +145,7 @@ class PaginationHelper ...@@ -145,7 +145,7 @@ class PaginationHelper
{ {
$limit = $pageOptions['limit']; $limit = $pageOptions['limit'];
$page = $pageOptions['page']; $page = $pageOptions['page'];
if (($page - 1) * $limit >= $count) { if (($page - 1) * $limit >= $count && $page > 1) {
throw new \VuFind\Exception\BadRequest('Page number out of range.'); throw new \VuFind\Exception\BadRequest('Page number out of range.');
} }
if ($pageOptions['ilsPaging'] && $limit < $count) { if ($pageOptions['ilsPaging'] && $limit < $count) {
......
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