]> git.mxchange.org Git - friendica.git/commitdiff
Unneeded variable removed
authorMichael <heluecht@pirati.ca>
Tue, 21 Mar 2023 06:42:29 +0000 (06:42 +0000)
committerMichael <heluecht@pirati.ca>
Tue, 21 Mar 2023 06:42:29 +0000 (06:42 +0000)
src/Model/GServer.php

index 635dcfc09ed6712ed439d3efa079a25e069aa70c..391e825c1c5ce24e35f0b414f8ded4d8b1a4d74b 100644 (file)
@@ -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 ?? '';
        }
 
        /**