aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorChristopher Ng <chrng8@gmail.com>2023-08-01 15:33:15 -0700
committerChristopher Ng <chrng8@gmail.com>2023-08-08 16:29:12 -0700
commit33f30f5ea2e630efcbc7b5a5d8031c7757efcde2 (patch)
treebc51e608892be282b3cfdfd99185c893c9dfd06c
parenta377862ed13fb03d7cba8b685d92f723373400e3 (diff)
downloadnextcloud-server-33f30f5ea2e630efcbc7b5a5d8031c7757efcde2.tar.gz
nextcloud-server-33f30f5ea2e630efcbc7b5a5d8031c7757efcde2.zip
fix: ignore non-existing
Signed-off-by: Christopher Ng <chrng8@gmail.com> (cherry picked from commit 2c4b562cdc9405d67f692cae009f6a282d085fd7)
-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);
}
}