diff options
author | Roeland Jago Douma <rullzer@users.noreply.github.com> | 2020-03-02 14:10:03 +0100 |
---|---|---|
committer | GitHub <noreply@github.com> | 2020-03-02 14:10:03 +0100 |
commit | 64a29d01a492db19289833ba9f485b7dca881cef (patch) | |
tree | 9fca7b36cada1242b844159d053f0d98cecc07e9 /apps | |
parent | 165fd30dc0ef007cdad6cd322f6e60064734b86b (diff) | |
parent | 7613681627a78d5994f2b21075f968a4fd50ea95 (diff) | |
download | nextcloud-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.php | 10 |
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; } |