Ensure pagination start is not a negative number

This commit is contained in:
3Dgoo 2021-02-25 07:25:18 +10:30 committed by GitHub
parent b286244a68
commit 6f3bc628a7
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 1 additions and 1 deletions

View File

@ -457,7 +457,7 @@ class BlogController extends PageController
$posts->setPageLength($pageSize);
// Set current page
$start = (int)$this->request->getVar($posts->getPaginationGetVar());
$start = max(0, (int)$this->request->getVar($posts->getPaginationGetVar()));
$posts->setPageStart($start);
return $posts;