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", 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))); } }