From b893ca5ee06b366f6d45b6d84c2e2d26c23514d0 Mon Sep 17 00:00:00 2001 From: James Heinrich Date: Sat, 21 Dec 2019 16:00:14 -0500 Subject: [PATCH] bugfix: #217 array offset on value of type bool Tweak to https://github.com/JamesHeinrich/getID3/pull/217 --- getid3/getid3.php | 2 +- getid3/module.audio.mp3.php | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/getid3/getid3.php b/getid3/getid3.php index 1aad8039..cc238253 100644 --- a/getid3/getid3.php +++ b/getid3/getid3.php @@ -250,7 +250,7 @@ class getID3 */ protected $startup_warning = ''; - const VERSION = '1.9.19-201912201038'; + const VERSION = '1.9.19-201912211559'; const FREAD_BUFFER_SIZE = 32768; const ATTACHMENTS_NONE = false; diff --git a/getid3/module.audio.mp3.php b/getid3/module.audio.mp3.php index e7049fb7..0b8a3511 100644 --- a/getid3/module.audio.mp3.php +++ b/getid3/module.audio.mp3.php @@ -1788,7 +1788,7 @@ public static function MPEGaudioHeaderBytesValid($head4, $allowBitrate15=false) * @return bool */ public static function MPEGaudioHeaderValid($rawarray, $echoerrors=false, $allowBitrate15=false) { - if (!$rawarray || ($rawarray['synch'] & 0x0FFE) != 0x0FFE) { + if (!isset($rawarray['synch']) || ($rawarray['synch'] & 0x0FFE) != 0x0FFE) { return false; }