Update NodeinfoService.php

pull/6474/head
Shlee 5 months ago committed by GitHub
parent e33026a9e5
commit 9d343fa027
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

@ -5,6 +5,7 @@ namespace App\Services;
use Illuminate\Http\Client\ConnectionException;
use Illuminate\Http\Client\RequestException;
use Illuminate\Support\Facades\Http;
use Illuminate\Support\Facades\Log;
class NodeinfoService
{
@ -48,8 +49,15 @@ class NodeinfoService
if (is_array($json['links'])) {
if (isset($json['links']['href'])) {
$href = $json['links']['href'];
} else {
} elseif (isset($json['links'][0]['href'])) {
$href = $json['links'][0]['href'];
} else {
Log::debug('NodeinfoService: malformed links array', [
'domain' => $domain,
'links' => $json['links'],
]);
return false;
}
} else {
return false;

Loading…
Cancel
Save