33
0
mirror of https://github.com/joomla-extensions/patchtester.git synced 2024-12-22 19:09:00 +00:00

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

View File

@ -372,8 +372,7 @@ class PullsModel extends ListModel
if ($page === 1) { if ($page === 1) {
// Default this to being a single page of results // Default this to being a single page of results
$lastPage = 1; $lastPage = 1;
if (isset($pullsResponse->headers['link'])) { if ($linkHeader = $pullsResponse->getHeader('link')) {
$linkHeader = $pullsResponse->headers['link'];
// The `joomla/http` 2.0 package uses PSR-7 Responses which has a different format for headers, check for this // The `joomla/http` 2.0 package uses PSR-7 Responses which has a different format for headers, check for this
if (is_array($linkHeader)) { if (is_array($linkHeader)) {
$linkHeader = $linkHeader[0]; $linkHeader = $linkHeader[0];