From 3b5dd77275edc06c504253a84b801a7c1c0e8076 Mon Sep 17 00:00:00 2001 From: Vincent Petry Date: Wed, 15 Dec 2021 14:25:39 +0100 Subject: [PATCH] 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(-) diff --git a/apps/files_sharing/lib/Notification/Notifier.php b/apps/files_sharing/lib/Notification/Notifier.php index 2499896653b0d..22cf83b547737 100644 --- a/apps/files_sharing/lib/Notification/Notifier.php +++ b/apps/files_sharing/lib/Notification/Notifier.php @@ -193,7 +193,7 @@ protected function parseShareInvitation(IShare $share, INotification $notificati } $group = $this->groupManager->get($share->getSharedWith()); - if (!$group->inGroup($user)) { + if ($group === null || !$group->inGroup($user)) { throw new AlreadyProcessedException(); }