Merge pull request #19731 from nextcloud/fix/15455/dont_hanlde_deleted_shares
Don't try to format deleted shares
This commit is contained in:
commit
64a29d01a4
1 changed files with 10 additions and 0 deletions
|
@ -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;
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue