diff options
author | Glandos <bugs-github@antipoul.fr> | 2022-11-01 22:16:56 +0100 |
---|---|---|
committer | Simon L <szaimen@e.mail.de> | 2023-04-17 16:29:13 +0200 |
commit | 4954bead1dc197217c068e25a8fc27e01c1a874e (patch) | |
tree | 670132b05be7c31112e0759605ea06e6597da83c /lib/private/Preview | |
parent | b6c65fee2acf14bd50daada653d3a40c663d16eb (diff) | |
download | nextcloud-server-4954bead1dc197217c068e25a8fc27e01c1a874e.tar.gz nextcloud-server-4954bead1dc197217c068e25a8fc27e01c1a874e.zip |
Ensure max preview image is not null
Signed-off-by: Glandos <bugs-github@antipoul.fr>
Diffstat (limited to 'lib/private/Preview')
-rw-r--r-- | lib/private/Preview/Generator.php | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/lib/private/Preview/Generator.php b/lib/private/Preview/Generator.php index fb57d5a78be..3ca84a9b6f6 100644 --- a/lib/private/Preview/Generator.php +++ b/lib/private/Preview/Generator.php @@ -208,6 +208,9 @@ class Generator { 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 |