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