From bdd30238bf2fd05acb1c502baabcd291d70ca0e3 Mon Sep 17 00:00:00 2001 From: Matias Griese Date: Wed, 29 Jan 2020 11:35:19 +0200 Subject: [PATCH] Fixed fatal error with non-integer page param value, Grav 1.7 [#2803] --- system/src/Grav/Common/Page/Pages.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/system/src/Grav/Common/Page/Pages.php b/system/src/Grav/Common/Page/Pages.php index 33a6cdc0d..6612ce813 100644 --- a/system/src/Grav/Common/Page/Pages.php +++ b/system/src/Grav/Common/Page/Pages.php @@ -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) {