Unneeded variable removed
This commit is contained in:
parent
afe1a59345
commit
7728232737
|
@ -1585,17 +1585,16 @@ class GServer
|
|||
*/
|
||||
private static function getNomadVersion(string $url): string
|
||||
{
|
||||
$version = '';
|
||||
$curlResult = DI::httpClient()->get($url . '/api/z/1.0/version', HttpClientAccept::JSON);
|
||||
if (!$curlResult->isSuccess() || ($curlResult->getBody() == '')) {
|
||||
return $version;
|
||||
return '';
|
||||
}
|
||||
|
||||
$data = json_decode($curlResult->getBody(), true);
|
||||
if (empty($data)) {
|
||||
return $version;
|
||||
return '';
|
||||
}
|
||||
return $data ?? $version;
|
||||
return $data ?? '';
|
||||
}
|
||||
|
||||
/**
|
||||
|
|
Loading…
Reference in New Issue
Block a user