From b5c5261077640d2390f4e3c44cc51bfe4bed2e4c Mon Sep 17 00:00:00 2001 From: cash Date: Sat, 30 Oct 2010 22:21:23 +0000 Subject: 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 --- mod/groups/start.php | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) (limited to 'mod/groups') 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]); + } } } -- cgit v1.2.3