diff options
author | Robin Appelman <icewind@owncloud.com> | 2015-06-29 14:42:14 +0200 |
---|---|---|
committer | Morris Jobke <hey@morrisjobke.de> | 2015-07-02 13:03:09 +0200 |
commit | a95b5c3b3e234880c260b4dda4cee20777ca4fca (patch) | |
tree | 162a0c3b0298fe7abf88e01372972f958e6b0a35 /lib/private | |
parent | 190210192304c0815ef375cfffd5534fcd6e6e56 (diff) | |
download | nextcloud-server-a95b5c3b3e234880c260b4dda4cee20777ca4fca.tar.gz nextcloud-server-a95b5c3b3e234880c260b4dda4cee20777ca4fca.zip |
handle invalid results from mount providers
Diffstat (limited to 'lib/private')
-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()); } |