summaryrefslogtreecommitdiffstats
path: root/lib/private/files/config
diff options
context:
space:
mode:
authorRobin Appelman <icewind@owncloud.com>2015-06-29 14:42:14 +0200
committerRobin Appelman <icewind@owncloud.com>2015-06-29 14:42:34 +0200
commit8a2ef26b5e8f2f8b4235263fb25c4d94d2f06647 (patch)
tree9c8c6504fb153be4825ade1daea68c882148c009 /lib/private/files/config
parentabb0c728ef1c7e84625e6f1a10aae740f5bb4ac5 (diff)
downloadnextcloud-server-8a2ef26b5e8f2f8b4235263fb25c4d94d2f06647.tar.gz
nextcloud-server-8a2ef26b5e8f2f8b4235263fb25c4d94d2f06647.zip
handle invalid results from mount providers
Diffstat (limited to 'lib/private/files/config')
-rw-r--r--lib/private/files/config/mountprovidercollection.php5
1 files changed, 4 insertions, 1 deletions
diff --git a/lib/private/files/config/mountprovidercollection.php b/lib/private/files/config/mountprovidercollection.php
index 7db0aff44e7..c75c64ae445 100644
--- a/lib/private/files/config/mountprovidercollection.php
+++ b/lib/private/files/config/mountprovidercollection.php
@@ -60,7 +60,10 @@ class MountProviderCollection implements IMountProviderCollection, Emitter {
$mounts = array_map(function (IMountProvider $provider) use ($user, $loader) {
return $provider->getMountsForUser($user, $loader);
}, $this->providers);
- return array_reduce($mounts, function ($mounts, $providerMounts) {
+ $mounts = array_filter($mounts, function ($result) {
+ return is_array($result);
+ });
+ return array_reduce($mounts, function (array $mounts, array $providerMounts) {
return array_merge($mounts, $providerMounts);
}, array());
}