Fix fatal error because of an invalid url

This commit is contained in:
Michael 2023-02-14 21:19:47 +00:00
parent f9b3340599
commit a3cb43805c
1 changed files with 3 additions and 2 deletions

View File

@ -1060,10 +1060,11 @@ class GServer
Logger::info('Invalid nodeinfo format', ['url' => $url]);
continue;
}
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') {
$nodeinfo2_url = $link['href'];
$nodeinfo2_url = Network::addBasePath($link['href'], $httpResult->getUrl());
}
}