Merge pull request #12796 from annando/fatal

Fix fatal error because of an invalid url
This commit is contained in:
Philipp 2023-02-14 22:28:01 +01:00 committed by GitHub
commit 40e0ea239a
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -1060,10 +1060,11 @@ class GServer
Logger::info('Invalid nodeinfo format', ['url' => $url]); Logger::info('Invalid nodeinfo format', ['url' => $url]);
continue; continue;
} }
if ($link['rel'] == 'http://nodeinfo.diaspora.software/ns/schema/1.0') { if ($link['rel'] == 'http://nodeinfo.diaspora.software/ns/schema/1.0') {
$nodeinfo1_url = $link['href']; $nodeinfo1_url = Network::addBasePath($link['href'], $httpResult->getUrl());
} elseif ($link['rel'] == 'http://nodeinfo.diaspora.software/ns/schema/2.0') { } elseif ($link['rel'] == 'http://nodeinfo.diaspora.software/ns/schema/2.0') {
$nodeinfo2_url = $link['href']; $nodeinfo2_url = Network::addBasePath($link['href'], $httpResult->getUrl());
} }
} }