From 448085f10be06c6c758be8271ebdd9d743fcda65 Mon Sep 17 00:00:00 2001 From: StudioMaX Date: Thu, 1 Feb 2024 22:04:54 +0600 Subject: [PATCH] Compatibility fix for PHP 5.3 --- getid3/module.audio-video.riff.php | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) diff --git a/getid3/module.audio-video.riff.php b/getid3/module.audio-video.riff.php index 256c8225..013b0c62 100644 --- a/getid3/module.audio-video.riff.php +++ b/getid3/module.audio-video.riff.php @@ -306,7 +306,8 @@ public function Analyze() { // Keep only string as far as first null byte, discard rest of fixed-width data // https://github.com/JamesHeinrich/getID3/issues/263 // https://github.com/JamesHeinrich/getID3/issues/430 - $thisfile_riff_WAVE_bext_0[$bext_key] = explode("\x00", $thisfile_riff_WAVE_bext_0[$bext_key])[0]; + $null_terminator_rows = explode("\x00", $thisfile_riff_WAVE_bext_0[$bext_key]); + $thisfile_riff_WAVE_bext_0[$bext_key] = $null_terminator_rows[0]; } $thisfile_riff_WAVE_bext_0['origin_date'] = substr($thisfile_riff_WAVE_bext_0['data'], 320, 10); @@ -1133,7 +1134,8 @@ public function Analyze() { foreach ($CommentsChunkNames as $key => $value) { if (isset($thisfile_riff[$RIFFsubtype][$key][0]['data'])) { // https://github.com/JamesHeinrich/getID3/issues/430 - $thisfile_riff['comments'][$value][] = explode("\x00", $thisfile_riff[$RIFFsubtype][$key][0]['data'])[0]; + $null_terminator_rows = explode("\x00", $thisfile_riff[$RIFFsubtype][$key][0]['data']); + $thisfile_riff['comments'][$value][] = $null_terminator_rows[0]; } } /* @@ -1226,7 +1228,8 @@ public function Analyze() { foreach ($CommentsChunkNames as $key => $value) { if (isset($thisfile_riff[$RIFFsubtype][$key][0]['data'])) { // https://github.com/JamesHeinrich/getID3/issues/430 - $thisfile_riff['comments'][$value][] = explode("\x00", $thisfile_riff[$RIFFsubtype][$key][0]['data'])[0]; + $null_terminator_rows = explode("\x00", $thisfile_riff[$RIFFsubtype][$key][0]['data']); + $thisfile_riff['comments'][$value][] = $null_terminator_rows[0]; } }