summaryrefslogtreecommitdiffstats
path: root/apps
diff options
context:
space:
mode:
authorRoeland Jago Douma <rullzer@users.noreply.github.com>2020-03-02 14:10:03 +0100
committerGitHub <noreply@github.com>2020-03-02 14:10:03 +0100
commit64a29d01a492db19289833ba9f485b7dca881cef (patch)
tree9fca7b36cada1242b844159d053f0d98cecc07e9 /apps
parent165fd30dc0ef007cdad6cd322f6e60064734b86b (diff)
parent7613681627a78d5994f2b21075f968a4fd50ea95 (diff)
downloadnextcloud-server-64a29d01a492db19289833ba9f485b7dca881cef.tar.gz
nextcloud-server-64a29d01a492db19289833ba9f485b7dca881cef.zip
Merge pull request #19731 from nextcloud/fix/15455/dont_hanlde_deleted_shares
Don't try to format deleted shares
Diffstat (limited to 'apps')
-rw-r--r--apps/files_sharing/lib/Controller/ShareAPIController.php10
1 files changed, 10 insertions, 0 deletions
diff --git a/apps/files_sharing/lib/Controller/ShareAPIController.php b/apps/files_sharing/lib/Controller/ShareAPIController.php
index 4893be25b20..68729db6de8 100644
--- a/apps/files_sharing/lib/Controller/ShareAPIController.php
+++ b/apps/files_sharing/lib/Controller/ShareAPIController.php
@@ -768,6 +768,16 @@ class ShareAPIController extends OCSController {
$known = $formatted = $miniFormatted = [];
$resharingRight = false;
foreach ($shares as $share) {
+ try {
+ $share->getNode();
+ } catch (NotFoundException $e) {
+ /*
+ * Ignore shares where we can't get the node
+ * For example delted shares
+ */
+ continue;
+ }
+
if (in_array($share->getId(), $known) || $share->getSharedWith() === $this->currentUser) {
continue;
}