Skip to content

Commit

Permalink
Merge pull request #3 from diglin/feature/update-to-php-8.1
Browse files Browse the repository at this point in the history
Add condition for compatibility with php 8.1
  • Loading branch information
sylvainraye authored Oct 18, 2022
2 parents f411993 + fc02a78 commit fd6fa59
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion composer.json
Original file line number Diff line number Diff line change
Expand Up @@ -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",
Expand Down
2 changes: 1 addition & 1 deletion src/Pagination/PageFactory.php
Original file line number Diff line number Diff line change
Expand Up @@ -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)));
}
}
Expand Down

0 comments on commit fd6fa59

Please sign in to comment.