From 5db778c1cefc2d599b3cf17678695ea42191452e Mon Sep 17 00:00:00 2001 From: Dries Vints Date: Tue, 26 Jan 2021 16:16:20 +0100 Subject: [PATCH] Typecast page number as integer --- src/Illuminate/Pagination/AbstractPaginator.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/Illuminate/Pagination/AbstractPaginator.php b/src/Illuminate/Pagination/AbstractPaginator.php index e09ec3b2c89c..5fefab34ce06 100644 --- a/src/Illuminate/Pagination/AbstractPaginator.php +++ b/src/Illuminate/Pagination/AbstractPaginator.php @@ -446,7 +446,7 @@ public static function currentPathResolver(Closure $resolver) public static function resolveCurrentPage($pageName = 'page', $default = 1) { if (isset(static::$currentPageResolver)) { - return call_user_func(static::$currentPageResolver, $pageName); + return (int) call_user_func(static::$currentPageResolver, $pageName); } return $default;