diff options
author | Vincent Petry <pvince81@owncloud.com> | 2016-08-25 18:06:13 +0200 |
---|---|---|
committer | Lukas Reschke <lukas@statuscode.ch> | 2016-08-30 19:49:23 +0200 |
commit | 669b0bc2ae6198a8f656f450ffbf351fb208951d (patch) | |
tree | d056060042d3dcbaa4a6ea429c28ca1d44014d8c /apps | |
parent | d17e126330617df9c19ca593cc54d56d960a4504 (diff) | |
download | nextcloud-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.php | 7 |
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; } } |