mirror of
https://github.com/getgrav/grav.git
synced 2026-03-02 02:21:29 +01:00
Fixed fatal error with non-integer page param value, Grav 1.7 [#2803]
This commit is contained in:
@@ -531,7 +531,7 @@ class Pages
|
||||
if ($pagination) {
|
||||
$params = $collection->params();
|
||||
|
||||
$limit = $params['limit'] ?? 0;
|
||||
$limit = (int)($params['limit'] ?? 0);
|
||||
$start = !empty($params['pagination']) ? (($params['page'] ?? $context['pagination_page']) - 1) * $limit : 0;
|
||||
|
||||
if ($limit && $collection->count() > $limit) {
|
||||
|
||||
Reference in New Issue
Block a user