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
This commit is contained in:
Sergey Biryukov 2020-04-20 11:32:37 +00:00
parent 02e17123f9
commit 5f03485bc7
2 changed files with 2 additions and 2 deletions

View File

@ -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;

View File

@ -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;
}