$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 = [];
}
}
- if (!$server) {
- return false;
+ if (empty($server)) {
+ return [];
}
return $server;
{
$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 = [];
}
if (empty($server)) {
- return false;
+ return [];
}
return $server;