From 39e14eb95c0b88c6905c50816149d13a0c9746e9 Mon Sep 17 00:00:00 2001 From: Mario Date: Fri, 21 Apr 2023 10:33:05 +0000 Subject: hotfix: make sure to not pass an empty path to fopen() --- Zotlabs/Thumbs/Pdf.php | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) (limited to 'Zotlabs/Thumbs/Pdf.php') diff --git a/Zotlabs/Thumbs/Pdf.php b/Zotlabs/Thumbs/Pdf.php index 11714ad53..6f9111ed3 100644 --- a/Zotlabs/Thumbs/Pdf.php +++ b/Zotlabs/Thumbs/Pdf.php @@ -11,9 +11,13 @@ class Pdf { function Thumb($attach,$preview_style,$height = 300, $width = 300) { + $file = dbunescbin($attach['content']); + if (!$file) { + return; + } + $photo = false; - $file = dbunescbin($attach['content']); $tmpfile = $file . '.pdf'; $outfile = $file . '.jpg'; -- cgit v1.2.3