Skip to content

Commit

Permalink
Fixed getting link header
Browse files Browse the repository at this point in the history
Signed-off-by: Roland Dalmulder <[email protected]>
  • Loading branch information
roland-d committed Aug 26, 2023
1 parent 13d174d commit 347ab47
Showing 1 changed file with 1 addition and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -372,8 +372,7 @@ public function requestFromGithub(int $page): array
if ($page === 1) {
// Default this to being a single page of results
$lastPage = 1;
if (isset($pullsResponse->headers['link'])) {
$linkHeader = $pullsResponse->headers['link'];
if ($linkHeader = $pullsResponse->getHeader('link')) {
// The `joomla/http` 2.0 package uses PSR-7 Responses which has a different format for headers, check for this
if (is_array($linkHeader)) {
$linkHeader = $linkHeader[0];
Expand Down

0 comments on commit 347ab47

Please sign in to comment.