mirror of
https://github.com/nextcloud/server.git
synced 2026-06-12 10:10:49 -04:00
fix: catch NodeNotFoundException in notifier
Signed-off-by: Christopher Ng <chrng8@gmail.com>
(cherry picked from commit c4b7056f58)
This commit is contained in:
parent
6fc3530b4f
commit
fa7985d0fd
1 changed files with 5 additions and 2 deletions
|
|
@ -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/...
|
||||
|
|
|
|||
Loading…
Reference in a new issue