diff options
-rw-r--r-- | include/zot.php | 8 |
1 files changed, 5 insertions, 3 deletions
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]); + } } } |