Fixed fatal error with non-integer page param value, Grav 1.7 [#2803]

This commit is contained in:
Matias Griese
2020-01-29 11:35:19 +02:00
parent 528ce7131e
commit bdd30238bf

View File

@@ -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) {