]> git.mxchange.org Git - friendica.git/blobdiff - mod/ostatus_subscribe.php
Merge pull request #6377 from annando/ostatus-notice
[friendica.git] / mod / ostatus_subscribe.php
index fc1ed22eadcfead4a794c9bb934937d3684371fc..5d493db32c74b2fce0a7e7eeb5ac5c52face3a21 100644 (file)
@@ -57,6 +57,10 @@ function ostatus_subscribe_content(App $a)
 
        $friends = json_decode(PConfig::get($uid, 'ostatus', 'legacy_friends'));
 
+       if (empty($friends)) {
+               $friends = [];
+       }
+
        $total = sizeof($friends);
 
        if ($counter >= $total) {
@@ -73,8 +77,8 @@ function ostatus_subscribe_content(App $a)
 
        $o .= '<p>' . $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');