]> git.mxchange.org Git - friendica.git/blobdiff - src/Model/GServer.php
Merge pull request #12946 from friendica/api-permission
[friendica.git] / 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 ?? '';
        }
 
        /**