From: Hypolite Petovan Date: Fri, 23 Nov 2018 00:03:24 +0000 (-0500) Subject: Prevent fatal error when $friends isn't an array X-Git-Url: https://git.mxchange.org/?a=commitdiff_plain;h=8d7fb354638ed5256f994fe1bc0792b40d57060f;p=friendica.git Prevent fatal error when $friends isn't an array --- diff --git a/mod/ostatus_subscribe.php b/mod/ostatus_subscribe.php index fc1ed22ead..5670820623 100644 --- a/mod/ostatus_subscribe.php +++ b/mod/ostatus_subscribe.php @@ -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) {