1
0
Fork 0

Avoid warnings

This commit is contained in:
Michael 2022-08-28 09:12:36 +00:00
parent 4e02c347b6
commit 3052ae71b7

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