Merge pull request #11979 from annando/issue-11853

Notices
This commit is contained in:
Hypolite Petovan 2022-10-09 17:45:33 -04:00 committed by GitHub
commit a10f55bb85
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
2 changed files with 7 additions and 3 deletions

View file

@ -2164,9 +2164,11 @@ class GServer
if ($curlResult->isSuccess()) {
$servers = json_decode($curlResult->getBody(), true);
foreach ($servers['instances'] as $server) {
$url = (is_null($server['https_score']) ? 'http' : 'https') . '://' . $server['name'];
self::add($url);
if (!empty($servers['instances'])) {
foreach ($servers['instances'] as $server) {
$url = (is_null($server['https_score']) ? 'http' : 'https') . '://' . $server['name'];
self::add($url);
}
}
}
}

View file

@ -1131,6 +1131,8 @@ class ParseUrl
$content = JsonLD::fetchElement($jsonld, 'logo', 'url', '@type', 'ImageObject');
if (!empty($content) && is_string($content)) {
$jsonldinfo['publisher_img'] = trim($content);
} elseif (!empty($content) && is_array($content)) {
$jsonldinfo['publisher_img'] = trim($content[0]);
}
$content = JsonLD::fetchElement($jsonld, 'brand', 'name', '@type', 'Organization');