mirror of
https://github.com/friendica/friendica
synced 2024-11-09 23:02:54 +00:00
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
|
||||
{
|
||||
$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 a new issue