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/Mp3audio.php | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) (limited to 'Zotlabs/Thumbs/Mp3audio.php') diff --git a/Zotlabs/Thumbs/Mp3audio.php b/Zotlabs/Thumbs/Mp3audio.php index 000d65b22..c50338fb2 100644 --- a/Zotlabs/Thumbs/Mp3audio.php +++ b/Zotlabs/Thumbs/Mp3audio.php @@ -11,9 +11,16 @@ class Mp3audio { } function Thumb($attach,$preview_style,$height = 300, $width = 300) { + + $file = dbunescbin($attach['content']); + if (!$file) { + return; + } + + $photo = false; $p = new ID3Parser(); - $id = $p->analyze(dbunescbin($attach['content'])); + $id = $p->analyze($file); $photo = isset($id['id3v2']['APIC'][0]['data']) ? $id['id3v2']['APIC'][0]['data'] : null; if(is_null($photo) && isset($id['id3v2']['PIC'][0]['data'])) { -- cgit v1.2.3