Browse Source

Unified return value types

tags/2019.12
Michael 1 year ago
parent
commit
af5527f896
1 changed files with 7 additions and 7 deletions
  1. +7
    -7
      src/Model/GServer.php

+ 7
- 7
src/Model/GServer.php View 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;


Loading…
Cancel
Save