aboutsummaryrefslogtreecommitdiffstats
path: root/Zotlabs/Thumbs/Mp3audio.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/Mp3audio.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/Mp3audio.php')
-rw-r--r--Zotlabs/Thumbs/Mp3audio.php9
1 files changed, 8 insertions, 1 deletions
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'])) {