aboutsummaryrefslogtreecommitdiffstats
path: root/apps/files_reminders/lib/Notification
diff options
context:
space:
mode:
Diffstat (limited to 'apps/files_reminders/lib/Notification')
-rw-r--r--apps/files_reminders/lib/Notification/Notifier.php5
1 files changed, 2 insertions, 3 deletions
diff --git a/apps/files_reminders/lib/Notification/Notifier.php b/apps/files_reminders/lib/Notification/Notifier.php
index f7ffa0b4437..a280c4d9336 100644
--- a/apps/files_reminders/lib/Notification/Notifier.php
+++ b/apps/files_reminders/lib/Notification/Notifier.php
@@ -69,11 +69,10 @@ class Notifier implements INotifier {
$params = $notification->getSubjectParameters();
$fileId = $params['fileId'];
- $nodes = $this->root->getUserFolder($notification->getUser())->getById($fileId);
- if (empty($nodes)) {
+ $node = $this->root->getUserFolder($notification->getUser())->getFirstNodeById($fileId);
+ if (!$node) {
throw new InvalidArgumentException();
}
- $node = reset($nodes);
$path = rtrim($node->getPath(), '/');
if (strpos($path, '/' . $notification->getUser() . '/files/') === 0) {