aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--apps/files_reminders/lib/Notification/Notifier.php7
1 files changed, 5 insertions, 2 deletions
diff --git a/apps/files_reminders/lib/Notification/Notifier.php b/apps/files_reminders/lib/Notification/Notifier.php
index c7384b43224..08aa8b2d67c 100644
--- a/apps/files_reminders/lib/Notification/Notifier.php
+++ b/apps/files_reminders/lib/Notification/Notifier.php
@@ -55,7 +55,6 @@ class Notifier implements INotifier {
/**
* @throws InvalidArgumentException
- * @throws NodeNotFoundException
*/
public function prepare(INotification $notification, string $languageCode): INotification {
$l = $this->l10nFactory->get(Application::APP_ID, $languageCode);
@@ -73,7 +72,11 @@ class Notifier implements INotifier {
throw new InvalidArgumentException();
}
- $node = $reminder->getNode();
+ try {
+ $node = $reminder->getNode();
+ } catch (NodeNotFoundException $e) {
+ throw new InvalidArgumentException();
+ }
$path = rtrim($node->getPath(), '/');
if (strpos($path, '/' . $notification->getUser() . '/files/') === 0) {
// Remove /user/files/...