diff options
author | Robin McCorkell <rmccorkell@karoshi.org.uk> | 2014-04-21 11:35:52 +0100 |
---|---|---|
committer | Robin McCorkell <rmccorkell@karoshi.org.uk> | 2014-04-25 09:50:34 +0100 |
commit | 77e3d067f03ba334fc1b06f8d2177006ef859822 (patch) | |
tree | e22d6f73a419b8cfe5ca17493d7d15d425c44b68 /lib/private | |
parent | 3fc809dfd80a296d7da922a06f9e13d446b3d3f0 (diff) | |
download | nextcloud-server-77e3d067f03ba334fc1b06f8d2177006ef859822.tar.gz nextcloud-server-77e3d067f03ba334fc1b06f8d2177006ef859822.zip |
Better handle return values from Filesystem::getMountBy*
getMountByStorageId and getMountByNumericId return an empty array on error,
which should be detected to avoid possible errors. This commit also adds in
some new logging points and throws to aid debugging
Diffstat (limited to 'lib/private')
-rw-r--r-- | lib/private/share/share.php | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/lib/private/share/share.php b/lib/private/share/share.php index c0ce3a1d8af..b12d62e8439 100644 --- a/lib/private/share/share.php +++ b/lib/private/share/share.php @@ -1228,7 +1228,7 @@ class Share extends \OC\Share\Constants { } else { if (!isset($mounts[$row['storage']])) { $mountPoints = \OC\Files\Filesystem::getMountByNumericId($row['storage']); - if (is_array($mountPoints)) { + if (is_array($mountPoints) && !empty($mountPoints)) { $mounts[$row['storage']] = current($mountPoints); } } |