Skip to content
Closed
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
Ensure max preview image is not null
Signed-off-by: Glandos <[email protected]>
  • Loading branch information
Glandos authored and Glandos committed Nov 3, 2022
commit efa3841e9f579a63f66ba82c7405e15cc6c62dee
3 changes: 3 additions & 0 deletions lib/private/Preview/Generator.php
Original file line number Diff line number Diff line change
Expand Up @@ -206,6 +206,9 @@ public function generatePreviews(File $file, array $specifications, $mimeType =
if ($maxPreviewImage === null) {
$maxPreviewImage = $this->helper->getImage($maxPreview);
}
if ($maxPreviewImage === null) {
throw new NotFoundException();
}

$preview = $this->generatePreview($previewFolder, $maxPreviewImage, $width, $height, $crop, $maxWidth, $maxHeight, $previewVersion);
// New file, augment our array
Expand Down