X-Git-Url: https://git.mxchange.org/?a=blobdiff_plain;f=src%2FProtocol%2FPortableContact.php;h=def8f1b628bc3b667636843c9d701f2bf331c5fb;hb=a80a6bec74dc35b90697dfde6260206bfb128827;hp=5345cb22fce2ae182c6f155ab93e518138c08790;hpb=59bbb1ac994690b8429bc004b2d3fe159e55f655;p=friendica.git diff --git a/src/Protocol/PortableContact.php b/src/Protocol/PortableContact.php index 5345cb22fc..def8f1b628 100644 --- a/src/Protocol/PortableContact.php +++ b/src/Protocol/PortableContact.php @@ -749,7 +749,7 @@ class PortableContact $friendica = false; $gnusocial = false; - if (is_array($nodeinfo['protocols']['inbound'])) { + if (!empty($nodeinfo['protocols']['inbound']) && is_array($nodeinfo['protocols']['inbound'])) { foreach ($nodeinfo['protocols']['inbound'] as $inbound) { if ($inbound == 'diaspora') { $diaspora = true; @@ -1004,7 +1004,7 @@ class PortableContact $server_url = str_replace("http://", "https://", $server_url); // We set the timeout to 20 seconds since this operation should be done in no time if the server was vital - $curlResult = Network::curl($server_url."/.well-known/host-meta", false, $redirects, ['timeout' => 20]); + $curlResult = Network::curl($server_url."/.well-known/host-meta", false, ['timeout' => 20]); // Quit if there is a timeout. // But we want to make sure to only quit if we are mostly sure that this server url fits. @@ -1021,7 +1021,7 @@ class PortableContact $server_url = str_replace("https://", "http://", $server_url); // We set the timeout to 20 seconds since this operation should be done in no time if the server was vital - $curlResult = Network::curl($server_url."/.well-known/host-meta", false, $redirects, ['timeout' => 20]); + $curlResult = Network::curl($server_url."/.well-known/host-meta", false, ['timeout' => 20]); // Quit if there is a timeout if ($curlResult->isTimeout()) { @@ -1624,7 +1624,7 @@ class PortableContact if (!empty($accesstoken)) { $api = 'https://instances.social/api/1.0/instances/list?count=0'; $header = ['Authorization: Bearer '.$accesstoken]; - $curlResult = Network::curl($api, false, $redirects, ['headers' => $header]); + $curlResult = Network::curl($api, false, ['headers' => $header]); if ($curlResult->isSuccess()) { $servers = json_decode($curlResult->getBody(), true);