aboutsummaryrefslogtreecommitdiffstats
path: root/Zotlabs/Thumbs/Pdf.php
diff options
context:
space:
mode:
authorMario <mario@mariovavti.com>2023-04-21 10:33:05 +0000
committerMario <mario@mariovavti.com>2023-04-21 10:33:05 +0000
commit39e14eb95c0b88c6905c50816149d13a0c9746e9 (patch)
tree3c531886f652cab2e1e2fb5cfd8e304a2b4c1a39 /Zotlabs/Thumbs/Pdf.php
parentf277d08244986c080d48af3e8bc86a9886d098bc (diff)
downloadvolse-hubzilla-39e14eb95c0b88c6905c50816149d13a0c9746e9.tar.gz
volse-hubzilla-39e14eb95c0b88c6905c50816149d13a0c9746e9.tar.bz2
volse-hubzilla-39e14eb95c0b88c6905c50816149d13a0c9746e9.zip
hotfix: make sure to not pass an empty path to fopen()
Diffstat (limited to 'Zotlabs/Thumbs/Pdf.php')
-rw-r--r--Zotlabs/Thumbs/Pdf.php6
1 files changed, 5 insertions, 1 deletions
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';