Skip to content

Commit

Permalink
Check if the node has a null ID before deleting in preview watcher
Browse files Browse the repository at this point in the history
Signed-off-by: Akhil <[email protected]>
  • Loading branch information
akhil1508 committed Oct 23, 2023
1 parent 834c9a2 commit 1d767eb
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions lib/private/Preview/Watcher.php
Original file line number Diff line number Diff line change
Expand Up @@ -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) {
Expand Down

0 comments on commit 1d767eb

Please sign in to comment.