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
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);
}
}
}
}