summaryrefslogtreecommitdiffstats
path: root/lib
diff options
context:
space:
mode:
authorThomas Müller <thomas.mueller@tmit.eu>2015-04-14 11:00:20 +0200
committerArthur Schiwon <blizzz@owncloud.com>2015-06-25 00:25:30 +0200
commit5e555f18b161a6ac9a97c2fe980c89bd237575b6 (patch)
tree0dba833b8106451c12fa819b79884466c7149ea4 /lib
parentf4e0b344c45f3c68c4de70b78bcb6b5f13039229 (diff)
downloadnextcloud-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.php6
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;