From: Michael Date: Sat, 5 Oct 2019 04:50:29 +0000 (+0000) Subject: Unified return value types X-Git-Url: https://git.mxchange.org/?a=commitdiff_plain;h=af5527f8968e2990aefba993560cc6c23ea88c02;p=friendica.git Unified return value types --- diff --git a/src/Model/GServer.php b/src/Model/GServer.php index 26824a237b..77d5563575 100644 --- a/src/Model/GServer.php +++ b/src/Model/GServer.php @@ -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;