Ensure pagination start is not a negative number
This commit is contained in:
parent
b286244a68
commit
6f3bc628a7
|
@ -457,7 +457,7 @@ class BlogController extends PageController
|
||||||
$posts->setPageLength($pageSize);
|
$posts->setPageLength($pageSize);
|
||||||
|
|
||||||
// Set current page
|
// Set current page
|
||||||
$start = (int)$this->request->getVar($posts->getPaginationGetVar());
|
$start = max(0, (int)$this->request->getVar($posts->getPaginationGetVar()));
|
||||||
$posts->setPageStart($start);
|
$posts->setPageStart($start);
|
||||||
|
|
||||||
return $posts;
|
return $posts;
|
||||||
|
|
Loading…
Reference in New Issue