From 4559a46c8d9497e9d923ea6c6cd8b7cf14729b1b Mon Sep 17 00:00:00 2001 From: Vincent Petry Date: Wed, 15 Dec 2021 14:25:39 +0100 Subject: Discard share notification for non-existing groups Group shares might exist even after a group got deleted. This fix catches the situation and discards the notification for the obsolete group. Signed-off-by: Vincent Petry Co-authored-by: Joas Schilling --- apps/files_sharing/lib/Notification/Notifier.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'apps/files_sharing/lib') diff --git a/apps/files_sharing/lib/Notification/Notifier.php b/apps/files_sharing/lib/Notification/Notifier.php index 7d79165dd26..d35e22c935d 100644 --- a/apps/files_sharing/lib/Notification/Notifier.php +++ b/apps/files_sharing/lib/Notification/Notifier.php @@ -192,7 +192,7 @@ class Notifier implements INotifier { } $group = $this->groupManager->get($share->getSharedWith()); - if (!$group->inGroup($user)) { + if ($group === null || !$group->inGroup($user)) { throw new AlreadyProcessedException(); } -- cgit v1.2.3