File tree Expand file tree Collapse file tree 1 file changed +9
-1
lines changed
administrator/components/com_patchtester/PatchTester/Model Expand file tree Collapse file tree 1 file changed +9
-1
lines changed Original file line number Diff line number Diff line change @@ -344,7 +344,15 @@ public function requestFromGithub($page)
344344
345345 if (isset ($ pullsResponse ->headers ['Link ' ]))
346346 {
347- preg_match ('/(\?page=[0-9]&per_page= ' . $ batchSize . '+>; rel=\"last\")/ ' , $ pullsResponse ->headers ['Link ' ], $ matches );
347+ $ linkHeader = $ pullsResponse ->headers ['Link ' ];
348+
349+ // The `joomla/http` 2.0 package uses PSR-7 Responses which has a different format for headers, check for this
350+ if (is_array ($ linkHeader ))
351+ {
352+ $ linkHeader = $ linkHeader [0 ];
353+ }
354+
355+ preg_match ('/(\?page=[0-9]&per_page= ' . $ batchSize . '+>; rel=\"last\")/ ' , $ linkHeader , $ matches );
348356
349357 if ($ matches && isset ($ matches [0 ]))
350358 {
You can’t perform that action at this time.
0 commit comments