Fixed getting link header

Signed-off-by: Roland Dalmulder <contact@rolandd.com>
This commit is contained in:
Roland Dalmulder 2023-08-26 12:05:29 +02:00
parent 13d174d1b8
commit 347ab47844
No known key found for this signature in database
GPG Key ID: 6D30CD38749A5B9E
1 changed files with 1 additions and 2 deletions

View File

@ -372,8 +372,7 @@ class PullsModel extends ListModel
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];