diff options
author | Christopher Ng <chrng8@gmail.com> | 2023-08-01 15:33:15 -0700 |
---|---|---|
committer | Christopher Ng <chrng8@gmail.com> | 2023-08-03 15:30:11 -0700 |
commit | 2c4b562cdc9405d67f692cae009f6a282d085fd7 (patch) | |
tree | 1641af6058e5bacf49ae4979dc3c69a654ee51e5 /apps/files_reminders | |
parent | e320166b151ef308a9a289c77bea2a4e50b4e994 (diff) | |
download | nextcloud-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.php | 6 |
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); } } |