From: Evan Prodromou Date: Tue, 5 Apr 2011 22:27:01 +0000 (-0400) Subject: don't put bogus groups into the groups array X-Git-Url: https://git.mxchange.org/?a=commitdiff_plain;h=b3e7dd70e25ffecddcb24e676bfc9ae328f16c70;p=quix0rs-gnu-social.git don't put bogus groups into the groups array --- 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);