aboutsummaryrefslogtreecommitdiffstats
path: root/apps/files_reminders
diff options
context:
space:
mode:
Diffstat (limited to 'apps/files_reminders')
-rw-r--r--apps/files_reminders/lib/Listener/NodeDeletedListener.php6
1 files changed, 6 insertions, 0 deletions
diff --git a/apps/files_reminders/lib/Listener/NodeDeletedListener.php b/apps/files_reminders/lib/Listener/NodeDeletedListener.php
index 88aed08bba8..460ddfd4abe 100644
--- a/apps/files_reminders/lib/Listener/NodeDeletedListener.php
+++ b/apps/files_reminders/lib/Listener/NodeDeletedListener.php
@@ -26,6 +26,8 @@ declare(strict_types=1);
namespace OCA\FilesReminders\Listener;
+use OC\Files\Node\NonExistingFile;
+use OC\Files\Node\NonExistingFolder;
use OCA\FilesReminders\Service\ReminderService;
use OCP\EventDispatcher\Event;
use OCP\EventDispatcher\IEventListener;
@@ -42,6 +44,10 @@ class NodeDeletedListener implements IEventListener {
}
$node = $event->getNode();
+ if ($node instanceof NonExistingFile || $node instanceof NonExistingFolder) {
+ return;
+ }
+
$this->reminderService->removeAllForNode($node);
}
}