Skip to content

Commit fd6fa59

Browse files
authored
Merge pull request #3 from diglin/feature/update-to-php-8.1
Add condition for compatibility with php 8.1
2 parents f411993 + fc02a78 commit fd6fa59

File tree

2 files changed

+2
-2
lines changed

2 files changed

+2
-2
lines changed

composer.json

+1-1
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,7 @@
2424
}
2525
},
2626
"require": {
27-
"php": ">=7.1",
27+
"php": ">=7.1 <8.2",
2828
"psr/http-client": "^1.0",
2929
"psr/http-message": "^1.0",
3030
"php-http/httplug": "^1.1 || ^2.0",

src/Pagination/PageFactory.php

+1-1
Original file line numberDiff line numberDiff line change
@@ -58,7 +58,7 @@ private function addFullUri(array $data): array
5858
foreach ($value as $subKey => $subValue) {
5959
if (is_string($subValue) && 0 === strpos($subValue, '/')) {
6060
$value[$subKey]['href'] = $this->uriGenerator->generate(urldecode($subValue));
61-
} elseif (0 === strpos(current($subValue), '/')) {
61+
} elseif ($subValue !== null && 0 === strpos(current($subValue), '/')) {
6262
$value[$subKey]['href'] = $this->uriGenerator->generate(urldecode(current($subValue)));
6363
}
6464
}

0 commit comments

Comments
 (0)