summaryrefslogtreecommitdiffstats
path: root/apps
diff options
context:
space:
mode:
authorVincent Petry <pvince81@owncloud.com>2016-08-25 18:06:13 +0200
committerLukas Reschke <lukas@statuscode.ch>2016-08-30 19:49:23 +0200
commit669b0bc2ae6198a8f656f450ffbf351fb208951d (patch)
treed056060042d3dcbaa4a6ea429c28ca1d44014d8c /apps
parentd17e126330617df9c19ca593cc54d56d960a4504 (diff)
downloadnextcloud-server-669b0bc2ae6198a8f656f450ffbf351fb208951d.tar.gz
nextcloud-server-669b0bc2ae6198a8f656f450ffbf351fb208951d.zip
Prevent error with orphaned shares when updating user mount cache
Diffstat (limited to 'apps')
-rw-r--r--apps/files_sharing/lib/SharedMount.php7
1 files changed, 6 insertions, 1 deletions
diff --git a/apps/files_sharing/lib/SharedMount.php b/apps/files_sharing/lib/SharedMount.php
index 2b562c4b4f1..c83a28d4c5e 100644
--- a/apps/files_sharing/lib/SharedMount.php
+++ b/apps/files_sharing/lib/SharedMount.php
@@ -246,6 +246,11 @@ class SharedMount extends MountPoint implements MoveableMount {
->from('filecache')
->where($builder->expr()->eq('fileid', $builder->createNamedParameter($this->getStorageRootId())));
- return $query->execute()->fetchColumn();
+ $result = $query->execute();
+ $row = $result->fetch();
+ if ($row) {
+ return $row['storage'];
+ }
+ return -1;
}
}