summaryrefslogtreecommitdiffstats
path: root/lib/private/group
diff options
context:
space:
mode:
authorThomas Müller <thomas.mueller@tmit.eu>2015-04-14 11:00:20 +0200
committerThomas Müller <thomas.mueller@tmit.eu>2015-04-14 11:00:20 +0200
commit88cc52c408c82c1eb8a416358fb6f87f60b22da7 (patch)
tree8686d72755e5b0c0cc17e8e2086c5c28005c51f8 /lib/private/group
parent75adee1ebd088819d6c3737bd7069419f268bf0d (diff)
downloadnextcloud-server-88cc52c408c82c1eb8a416358fb6f87f60b22da7.tar.gz
nextcloud-server-88cc52c408c82c1eb8a416358fb6f87f60b22da7.zip
Avoid php message "Invalid argument supplied for foreach()" - refs #15590
Diffstat (limited to 'lib/private/group')
-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 774a76a3063..12136a1bd25 100644
--- a/lib/private/group/manager.php
+++ b/lib/private/group/manager.php
@@ -205,8 +205,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;