Skip to content
Snippets Groups Projects
Unverified Commit 64a29d01 authored by Roeland Jago Douma's avatar Roeland Jago Douma Committed by GitHub
Browse files

Merge pull request #19731 from nextcloud/fix/15455/dont_hanlde_deleted_shares

Don't try to format deleted shares
parents 165fd30d 76136816
No related branches found
No related tags found
No related merge requests found
...@@ -768,6 +768,16 @@ class ShareAPIController extends OCSController { ...@@ -768,6 +768,16 @@ class ShareAPIController extends OCSController {
$known = $formatted = $miniFormatted = []; $known = $formatted = $miniFormatted = [];
$resharingRight = false; $resharingRight = false;
foreach ($shares as $share) { 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) { if (in_array($share->getId(), $known) || $share->getSharedWith() === $this->currentUser) {
continue; continue;
} }
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment