From 1d767ebff584eeb496c97dc7c0c2226791f358be Mon Sep 17 00:00:00 2001 From: Akhil Date: Mon, 23 Oct 2023 20:32:11 +0530 Subject: [PATCH] Check if the node has a null ID before deleting in preview watcher Signed-off-by: Akhil --- lib/private/Preview/Watcher.php | 3 +++ 1 file changed, 3 insertions(+) diff --git a/lib/private/Preview/Watcher.php b/lib/private/Preview/Watcher.php index 7f4593f9fe3c9..ad6fed560203b 100644 --- a/lib/private/Preview/Watcher.php +++ b/lib/private/Preview/Watcher.php @@ -61,6 +61,9 @@ protected function deleteNode(Node $node) { } try { + if (is_null($node->getId())) { + return; + } $folder = $this->appData->getFolder((string)$node->getId()); $folder->delete(); } catch (NotFoundException $e) {