summaryrefslogtreecommitdiffstats
path: root/lib/private
diff options
context:
space:
mode:
authorRobin McCorkell <rmccorkell@karoshi.org.uk>2014-04-21 11:35:52 +0100
committerRobin McCorkell <rmccorkell@karoshi.org.uk>2014-04-25 09:50:34 +0100
commit77e3d067f03ba334fc1b06f8d2177006ef859822 (patch)
treee22d6f73a419b8cfe5ca17493d7d15d425c44b68 /lib/private
parent3fc809dfd80a296d7da922a06f9e13d446b3d3f0 (diff)
downloadnextcloud-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.php2
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);
}
}