1
0
Fork 0

Merge pull request #10088 from alexander-schranz/patch-1

Fix GithubDriver nextPage deprecation notice with no link header
pull/10089/head
Jordi Boggiano 2021-09-03 21:37:45 +02:00 committed by GitHub
commit 73e95aa0f9
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 4 additions and 0 deletions

View File

@ -576,6 +576,10 @@ class GitHubDriver extends VcsDriver
{ {
$header = $response->getHeader('link'); $header = $response->getHeader('link');
if (!$header) {
return;
}
$links = explode(',', $header); $links = explode(',', $header);
foreach ($links as $link) { foreach ($links as $link) {
if (preg_match('{<(.+?)>; *rel="next"}', $link, $match)) { if (preg_match('{<(.+?)>; *rel="next"}', $link, $match)) {