aboutsummaryrefslogtreecommitdiffstats
path: root/apps/files_reminders
diff options
context:
space:
mode:
authorChristopher Ng <chrng8@gmail.com>2023-08-01 15:33:15 -0700
committerChristopher Ng <chrng8@gmail.com>2023-08-03 15:30:11 -0700
commit2c4b562cdc9405d67f692cae009f6a282d085fd7 (patch)
tree1641af6058e5bacf49ae4979dc3c69a654ee51e5 /apps/files_reminders
parente320166b151ef308a9a289c77bea2a4e50b4e994 (diff)
downloadnextcloud-server-2c4b562cdc9405d67f692cae009f6a282d085fd7.tar.gz
nextcloud-server-2c4b562cdc9405d67f692cae009f6a282d085fd7.zip
fix: ignore non-existing
Signed-off-by: Christopher Ng <chrng8@gmail.com>
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);
}
}