Skip to content

Commit

Permalink
Merge pull request #2458 from LibreSign/bugfix/var-type
Browse files Browse the repository at this point in the history
Prevent to send nul to method that need a node as argument
  • Loading branch information
vitormattos authored Mar 6, 2024
2 parents dc84611 + 01f628d commit 82e2a80
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions lib/Controller/FileController.php
Original file line number Diff line number Diff line change
Expand Up @@ -186,6 +186,9 @@ public function getThumbnail(
$nodes = $userFolder->getById($nodeId);

$node = array_pop($nodes);
if (!$node) {
return new DataResponse([], Http::STATUS_NOT_FOUND);
}

return $this->fetchPreview($node, $x, $y, $a, $forceIcon, $mode, $mimeFallback);
}
Expand Down

0 comments on commit 82e2a80

Please sign in to comment.