diff options
author | redmatrix <git@macgirvin.com> | 2016-06-09 22:07:27 -0700 |
---|---|---|
committer | redmatrix <git@macgirvin.com> | 2016-06-09 22:07:27 -0700 |
commit | bb3d56a0b2e3676e780b4b6dd4e1b31b211c7b5e (patch) | |
tree | 1dde738343819137fdb4f206a05a907054ff3e6b /Zotlabs/Module/Acl.php | |
parent | 8f181bb18888db6bdd15d470717da4d53ea7606a (diff) | |
download | volse-hubzilla-bb3d56a0b2e3676e780b4b6dd4e1b31b211c7b5e.tar.gz volse-hubzilla-bb3d56a0b2e3676e780b4b6dd4e1b31b211c7b5e.tar.bz2 volse-hubzilla-bb3d56a0b2e3676e780b4b6dd4e1b31b211c7b5e.zip |
foreach: invalid argument
Diffstat (limited to 'Zotlabs/Module/Acl.php')
-rw-r--r-- | Zotlabs/Module/Acl.php | 28 |
1 files changed, 15 insertions, 13 deletions
diff --git a/Zotlabs/Module/Acl.php b/Zotlabs/Module/Acl.php index 7bc197a93..2bc4ba62d 100644 --- a/Zotlabs/Module/Acl.php +++ b/Zotlabs/Module/Acl.php @@ -65,18 +65,20 @@ class Acl extends \Zotlabs\Web\Controller { intval($count), intval($start) ); - - foreach($r as $g){ - // logger('acl: group: ' . $g['gname'] . ' members: ' . group_get_members_xchan($g['id'])); - $groups[] = array( - "type" => "g", - "photo" => "images/twopeople.png", - "name" => $g['gname'], - "id" => $g['id'], - "xid" => $g['hash'], - "uids" => group_get_members_xchan($g['id']), - "link" => '' - ); + + if($r) { + foreach($r as $g){ + // logger('acl: group: ' . $g['gname'] . ' members: ' . group_get_members_xchan($g['id'])); + $groups[] = array( + "type" => "g", + "photo" => "images/twopeople.png", + "name" => $g['gname'], + "id" => $g['id'], + "xid" => $g['hash'], + "uids" => group_get_members_xchan($g['id']), + "link" => '' + ); + } } } @@ -204,7 +206,7 @@ class Acl extends \Zotlabs\Web\Controller { else $r = array(); - if(count($r)) { + if($r) { foreach($r as $g){ // remove RSS feeds from ACLs - they are inaccessible |