]> git.mxchange.org Git - friendica.git/commitdiff
Unified return value types
authorMichael <heluecht@pirati.ca>
Sat, 5 Oct 2019 04:50:29 +0000 (04:50 +0000)
committerMichael <heluecht@pirati.ca>
Sat, 5 Oct 2019 04:50:29 +0000 (04:50 +0000)
src/Model/GServer.php

index 26824a237b111dcd3c978d74b6f304779286c6b2..77d556357587d76f1f4c8e0c235a12f33be05ac2 100644 (file)
@@ -402,13 +402,13 @@ class GServer
                $curlResult = Network::curl($nodeinfo_url);
 
                if (!$curlResult->isSuccess()) {
-                       return false;
+                       return [];
                }
 
                $nodeinfo = json_decode($curlResult->getBody(), true);
 
                if (!is_array($nodeinfo)) {
-                       return false;
+                       return [];
                }
 
                $server = [];
@@ -461,8 +461,8 @@ class GServer
                        }
                }
 
-               if (!$server) {
-                       return false;
+               if (empty($server)) {
+                       return [];
                }
 
                return $server;
@@ -479,13 +479,13 @@ class GServer
        {
                $curlResult = Network::curl($nodeinfo_url);
                if (!$curlResult->isSuccess()) {
-                       return false;
+                       return [];
                }
 
                $nodeinfo = json_decode($curlResult->getBody(), true);
 
                if (!is_array($nodeinfo)) {
-                       return false;
+                       return [];
                }
 
                $server = [];
@@ -539,7 +539,7 @@ class GServer
                }
 
                if (empty($server)) {
-                       return false;
+                       return [];
                }
 
                return $server;