From b3e7dd70e25ffecddcb24e676bfc9ae328f16c70 Mon Sep 17 00:00:00 2001 From: Evan Prodromou Date: Tue, 5 Apr 2011 18:27:01 -0400 Subject: [PATCH] don't put bogus groups into the groups array --- classes/Profile.php | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/classes/Profile.php b/classes/Profile.php index f7a94413b2..9f63980242 100644 --- a/classes/Profile.php +++ b/classes/Profile.php @@ -272,7 +272,10 @@ class Profile extends Memcached_DataObject $groups = array(); foreach ($ids as $id) { - $groups[] = User_group::staticGet('id', $id); + $group = User_group::staticGet('id', $id); + if (!empty($group)) { + $groups[] = $group; + } } return new ArrayWrapper($groups); -- 2.39.5