don't put bogus groups into the groups array

This commit is contained in:
Evan Prodromou 2011-04-05 18:27:01 -04:00
parent 1459443b21
commit b3e7dd70e2
1 changed files with 4 additions and 1 deletions

View 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);