From 77e3d067f03ba334fc1b06f8d2177006ef859822 Mon Sep 17 00:00:00 2001 From: Robin McCorkell Date: Mon, 21 Apr 2014 11:35:52 +0100 Subject: 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 --- lib/private/share/share.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'lib/private') 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); } } -- cgit v1.2.3