diff options
author | Vincent Petry <vincent@nextcloud.com> | 2021-12-15 16:25:39 +0300 |
---|---|---|
committer | Vincent Petry <vincent@nextcloud.com> | 2021-12-15 16:55:27 +0300 |
commit | 4559a46c8d9497e9d923ea6c6cd8b7cf14729b1b (patch) | |
tree | cc1a2da3f007078bf650ce6fc0bb5a6d4a781c4a /apps/files_sharing | |
parent | a47da9722dfaec8d83e9c8543ed0c31138a909da (diff) |
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 <vincent@nextcloud.com>
Co-authored-by: Joas Schilling <coding@schilljs.com>
Diffstat (limited to 'apps/files_sharing')
-rw-r--r-- | apps/files_sharing/lib/Notification/Notifier.php | 2 |
1 files changed, 1 insertions, 1 deletions
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(); } |