From: Michael Date: Sat, 22 Dec 2018 17:00:28 +0000 (+0000) Subject: The curl result is an object, not an array X-Git-Url: https://git.mxchange.org/?a=commitdiff_plain;h=c06f7ad11e3040e9cb7b2a09682a33cbdd5d5ccd;p=friendica.git The curl result is an object, not an array --- diff --git a/mod/ostatus_subscribe.php b/mod/ostatus_subscribe.php index 5670820623..5d493db32c 100644 --- a/mod/ostatus_subscribe.php +++ b/mod/ostatus_subscribe.php @@ -77,8 +77,8 @@ function ostatus_subscribe_content(App $a) $o .= '

' . $counter . '/' . $total . ': ' . $url; - $curlResult = Probe::uri($url); - if ($curlResult['network'] == Protocol::OSTATUS) { + $probed = Probe::uri($url); + if ($probed['network'] == Protocol::OSTATUS) { $result = Contact::createFromProbe($uid, $url, true, Protocol::OSTATUS); if ($result['success']) { $o .= ' - ' . L10n::t('success'); diff --git a/src/Network/Probe.php b/src/Network/Probe.php index f4e3d1d43c..b4e297afa2 100644 --- a/src/Network/Probe.php +++ b/src/Network/Probe.php @@ -1317,7 +1317,7 @@ class Probe if ($curlResult->isTimeout()) { return false; } - $pubkey = $curlResult['body']; + $pubkey = $curlResult->getBody(); } $key = explode(".", $pubkey); diff --git a/src/Protocol/PortableContact.php b/src/Protocol/PortableContact.php index de49a8d3ca..cd85c1c0ae 100644 --- a/src/Protocol/PortableContact.php +++ b/src/Protocol/PortableContact.php @@ -1778,7 +1778,7 @@ class PortableContact $curlResult = Network::curl($url); if ($curlResult->isSuccess()) { - $data = json_decode($curlResult["body"], true); + $data = json_decode($curlResult->getBody(), true); if (!empty($data)) { self::discoverServer($data, 3);