Prevent fatal error when $friends isn't an array
This commit is contained in:
parent
03c5c7ca0a
commit
8d7fb35463
|
@ -57,6 +57,10 @@ function ostatus_subscribe_content(App $a)
|
||||||
|
|
||||||
$friends = json_decode(PConfig::get($uid, 'ostatus', 'legacy_friends'));
|
$friends = json_decode(PConfig::get($uid, 'ostatus', 'legacy_friends'));
|
||||||
|
|
||||||
|
if (empty($friends)) {
|
||||||
|
$friends = [];
|
||||||
|
}
|
||||||
|
|
||||||
$total = sizeof($friends);
|
$total = sizeof($friends);
|
||||||
|
|
||||||
if ($counter >= $total) {
|
if ($counter >= $total) {
|
||||||
|
|
Loading…
Reference in New Issue
Block a user