diff options
author | Thomas Müller <thomas.mueller@tmit.eu> | 2015-04-14 11:00:20 +0200 |
---|---|---|
committer | Arthur Schiwon <blizzz@owncloud.com> | 2015-06-25 00:25:30 +0200 |
commit | 5e555f18b161a6ac9a97c2fe980c89bd237575b6 (patch) | |
tree | 0dba833b8106451c12fa819b79884466c7149ea4 /lib | |
parent | f4e0b344c45f3c68c4de70b78bcb6b5f13039229 (diff) | |
download | nextcloud-server-5e555f18b161a6ac9a97c2fe980c89bd237575b6.tar.gz nextcloud-server-5e555f18b161a6ac9a97c2fe980c89bd237575b6.zip |
Backport of #15592 to stable8
Avoid php message "Invalid argument supplied for foreach()" - refs #15590
Remove unneeded comments
Diffstat (limited to 'lib')
-rw-r--r-- | lib/private/group/manager.php | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/lib/private/group/manager.php b/lib/private/group/manager.php index 8dcf14fc1d2..56b82c419db 100644 --- a/lib/private/group/manager.php +++ b/lib/private/group/manager.php @@ -184,8 +184,10 @@ class Manager extends PublicEmitter implements IGroupManager { $groups = array(); foreach ($this->backends as $backend) { $groupIds = $backend->getUserGroups($uid); - foreach ($groupIds as $groupId) { - $groups[$groupId] = $this->get($groupId); + if (is_array($groupIds)) { + foreach ($groupIds as $groupId) { + $groups[$groupId] = $this->get($groupId); + } } } $this->cachedUserGroups[$uid] = $groups; |