From a824a87d80d040bd4d57b0549badef25540081cf Mon Sep 17 00:00:00 2001 From: friendica Date: Wed, 2 Jan 2013 01:44:50 -0800 Subject: foreach issue --- include/zot.php | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) (limited to 'include/zot.php') diff --git a/include/zot.php b/include/zot.php index ea2800672..46f0bd397 100644 --- a/include/zot.php +++ b/include/zot.php @@ -248,9 +248,11 @@ function zot_refresh($them,$channel = null) { else $permissions = $j['permissions']; - foreach($permissions as $k => $v) { - if($v) { - $their_perms = $their_perms | intval($global_perms[$k][1]); + if($permissions && is_array($permissions)) { + foreach($permissions as $k => $v) { + if($v) { + $their_perms = $their_perms | intval($global_perms[$k][1]); + } } } -- cgit v1.2.3