]> git.mxchange.org Git - quix0rs-gnu-social.git/commitdiff
don't put bogus groups into the groups array
authorEvan Prodromou <evan@status.net>
Tue, 5 Apr 2011 22:27:01 +0000 (18:27 -0400)
committerEvan Prodromou <evan@status.net>
Tue, 5 Apr 2011 22:27:01 +0000 (18:27 -0400)
classes/Profile.php

index f7a94413b253d76b8127b68eb0068c8eb64c14f1..9f6398024291e8e3a75725b81e735852dda63e0d 100644 (file)
@@ -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);