diff options
author | Robin Appelman <icewind@owncloud.com> | 2015-06-29 14:42:14 +0200 |
---|---|---|
committer | Robin Appelman <icewind@owncloud.com> | 2015-06-29 14:42:34 +0200 |
commit | 8a2ef26b5e8f2f8b4235263fb25c4d94d2f06647 (patch) | |
tree | 9c8c6504fb153be4825ade1daea68c882148c009 /lib/private/files/config | |
parent | abb0c728ef1c7e84625e6f1a10aae740f5bb4ac5 (diff) | |
download | nextcloud-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.php | 5 |
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()); } |