Skip to content

Commit

Permalink
Merge pull request #19731 from nextcloud/fix/15455/dont_hanlde_delete…
Browse files Browse the repository at this point in the history
…d_shares

Don't try to format deleted shares
  • Loading branch information
rullzer authored Mar 2, 2020
2 parents 165fd30 + 7613681 commit 64a29d0
Showing 1 changed file with 10 additions and 0 deletions.
10 changes: 10 additions & 0 deletions apps/files_sharing/lib/Controller/ShareAPIController.php
Original file line number Diff line number Diff line change
Expand Up @@ -768,6 +768,16 @@ private function getFormattedShares(
$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;
}
Expand Down

0 comments on commit 64a29d0

Please sign in to comment.