From af5527f8968e2990aefba993560cc6c23ea88c02 Mon Sep 17 00:00:00 2001 From: Michael Date: Sat, 5 Oct 2019 04:50:29 +0000 Subject: [PATCH] Unified return value types --- src/Model/GServer.php | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) 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; -- 2.39.5