From 422ef37d40f9e871ee38fab746d20f15afa3fda5 Mon Sep 17 00:00:00 2001 From: Gautier Masdupuy Date: Tue, 20 Sep 2022 09:50:34 +0200 Subject: [PATCH 1/2] Add condition for compatibility with php 8.1 --- src/Pagination/PageFactory.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/Pagination/PageFactory.php b/src/Pagination/PageFactory.php index 465d6d8..b080b4c 100644 --- a/src/Pagination/PageFactory.php +++ b/src/Pagination/PageFactory.php @@ -58,7 +58,7 @@ private function addFullUri(array $data): array foreach ($value as $subKey => $subValue) { if (is_string($subValue) && 0 === strpos($subValue, '/')) { $value[$subKey]['href'] = $this->uriGenerator->generate(urldecode($subValue)); - } elseif (0 === strpos(current($subValue), '/')) { + } elseif ($subValue !== null && 0 === strpos(current($subValue), '/')) { $value[$subKey]['href'] = $this->uriGenerator->generate(urldecode(current($subValue))); } } From fc02a78be20a71949537bd65cc1670ef836018c8 Mon Sep 17 00:00:00 2001 From: Gautier Masdupuy Date: Tue, 18 Oct 2022 16:35:49 +0200 Subject: [PATCH 2/2] Update composer.json to set a maximum version of php --- composer.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/composer.json b/composer.json index cc72ce5..c824277 100644 --- a/composer.json +++ b/composer.json @@ -24,7 +24,7 @@ } }, "require": { - "php": ">=7.1", + "php": ">=7.1 <8.2", "psr/http-client": "^1.0", "psr/http-message": "^1.0", "php-http/httplug": "^1.1 || ^2.0",