summaryrefslogtreecommitdiffstats
path: root/apps/files_sharing
diff options
context:
space:
mode:
authorJohn Molakvoæ <skjnldsv@users.noreply.github.com>2023-08-11 09:05:05 +0200
committerGitHub <noreply@github.com>2023-08-11 09:05:05 +0200
commit58f1fffde4b3d9532ad593e99db3498245b6476a (patch)
treec7a476ef3d9d6ee805cb3a7fec4cbffc519e7889 /apps/files_sharing
parent5ec25e9e9a03e7509efea130255cad3e7ab1ac73 (diff)
parentaaa620044c885281f1879313cf71c512ab248c49 (diff)
downloadnextcloud-server-58f1fffde4b3d9532ad593e99db3498245b6476a.tar.gz
nextcloud-server-58f1fffde4b3d9532ad593e99db3498245b6476a.zip
Merge pull request #39710 from nextcloud/backport/39689/stable27
Diffstat (limited to 'apps/files_sharing')
-rw-r--r--apps/files_sharing/lib/Notification/Notifier.php8
1 files changed, 8 insertions, 0 deletions
diff --git a/apps/files_sharing/lib/Notification/Notifier.php b/apps/files_sharing/lib/Notification/Notifier.php
index 455d0fd66fc..d339c484dd7 100644
--- a/apps/files_sharing/lib/Notification/Notifier.php
+++ b/apps/files_sharing/lib/Notification/Notifier.php
@@ -29,6 +29,7 @@ declare(strict_types=1);
namespace OCA\Files_Sharing\Notification;
use OCP\Files\IRootFolder;
+use OCP\Files\NotFoundException;
use OCP\IGroupManager;
use OCP\IL10N;
use OCP\IURLGenerator;
@@ -117,6 +118,13 @@ class Notifier implements INotifier {
throw new AlreadyProcessedException();
}
+ try {
+ $share->getNode();
+ } catch (NotFoundException $e) {
+ // Node is already deleted, so discard the notification
+ throw new AlreadyProcessedException();
+ }
+
if ($notification->getSubject() === 'expiresTomorrow') {
$notification = $this->parseShareExpiration($share, $notification, $l);
} else {