From 5f03485bc76fc61dab8da8b7559485c2ef32e3ba Mon Sep 17 00:00:00 2001 From: Sergey Biryukov Date: Mon, 20 Apr 2020 11:32:37 +0000 Subject: [PATCH] External Libraries: Backport a commit from getID3() trunk to fix a PHP 7.4+ notice. This addresses a "Trying to access array offset on value of type bool" notice in the `getid3_mp3::MPEGaudioHeaderValid()` method. Props schlessera. Fixes #49945. git-svn-id: https://develop.svn.wordpress.org/trunk@47602 602fd350-edb4-49c9-b593-d223f7449a82 --- src/wp-includes/ID3/getid3.php | 2 +- src/wp-includes/ID3/module.audio.mp3.php | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/src/wp-includes/ID3/getid3.php b/src/wp-includes/ID3/getid3.php index a6260f0689..cc238253d5 100644 --- a/src/wp-includes/ID3/getid3.php +++ b/src/wp-includes/ID3/getid3.php @@ -250,7 +250,7 @@ class getID3 */ protected $startup_warning = ''; - const VERSION = '1.9.19-201912131005'; + const VERSION = '1.9.19-201912211559'; const FREAD_BUFFER_SIZE = 32768; const ATTACHMENTS_NONE = false; diff --git a/src/wp-includes/ID3/module.audio.mp3.php b/src/wp-includes/ID3/module.audio.mp3.php index 192317467c..0b8a351169 100644 --- a/src/wp-includes/ID3/module.audio.mp3.php +++ b/src/wp-includes/ID3/module.audio.mp3.php @@ -1788,7 +1788,7 @@ class getid3_mp3 extends getid3_handler * @return bool */ public static function MPEGaudioHeaderValid($rawarray, $echoerrors=false, $allowBitrate15=false) { - if (($rawarray['synch'] & 0x0FFE) != 0x0FFE) { + if (!isset($rawarray['synch']) || ($rawarray['synch'] & 0x0FFE) != 0x0FFE) { return false; }