]> git.mxchange.org Git - friendica.git/commitdiff
Prevent fatal error when $friends isn't an array
authorHypolite Petovan <hypolite@mrpetovan.com>
Fri, 23 Nov 2018 00:03:24 +0000 (19:03 -0500)
committerHypolite Petovan <hypolite@mrpetovan.com>
Fri, 23 Nov 2018 00:03:24 +0000 (19:03 -0500)
mod/ostatus_subscribe.php

index fc1ed22eadcfead4a794c9bb934937d3684371fc..5670820623449c1e65f2c77da79c09b3e32b71ed 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) {