From: cash Date: Sat, 30 Oct 2010 22:21:23 +0000 (+0000) Subject: checking if the site has any groups before looping over them X-Git-Url: https://gitweb.fluxo.info/?a=commitdiff_plain;h=b5c5261077640d2390f4e3c44cc51bfe4bed2e4c;p=lorea%2Felgg.git checking if the site has any groups before looping over them git-svn-id: http://code.elgg.org/elgg/trunk@7148 36083f99-b078-4883-b0ff-0f9b5a30f544 --- diff --git a/mod/groups/start.php b/mod/groups/start.php index d6db817b8..e2ddec5d1 100644 --- a/mod/groups/start.php +++ b/mod/groups/start.php @@ -421,8 +421,10 @@ 'limit' => 999 )); - foreach ($groups as $group) { - unset($returnvalue[$group->group_acl]); + if ($groups) { + foreach ($groups as $group) { + unset($returnvalue[$group->group_acl]); + } } }