]> source.dussan.org Git - nextcloud-server.git/commitdiff
don't return null for not existing group id's
authorJörn Friedrich Dreyer <jfd@butonic.de>
Tue, 7 Apr 2015 11:47:10 +0000 (13:47 +0200)
committerJörn Friedrich Dreyer <jfd@butonic.de>
Tue, 7 Apr 2015 11:47:10 +0000 (13:47 +0200)
lib/private/group/manager.php

index 417be79ab30af40beed1cf73dc2684be0f83daa6..a7e83f932d1a05bc1525da52650497be421634cf 100644 (file)
@@ -156,7 +156,10 @@ class Manager extends PublicEmitter implements IGroupManager {
                foreach ($this->backends as $backend) {
                        $groupIds = $backend->getGroups($search, $limit, $offset);
                        foreach ($groupIds as $groupId) {
-                               $groups[$groupId] = $this->get($groupId);
+                               $group = $this->get($groupId);
+                               if (!is_null($group)) {
+                                       $groups[$groupId] = $group;
+                               }
                        }
                        if (!is_null($limit) and $limit <= 0) {
                                return array_values($groups);