aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-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;
}