diff options
author | Mario <mario@mariovavti.com> | 2021-05-26 17:54:07 +0000 |
---|---|---|
committer | Mario <mario@mariovavti.com> | 2021-05-26 17:54:07 +0000 |
commit | 84c5f57d2243ff8aa335e37fd5c6cb1b6d64e7d1 (patch) | |
tree | c94f7911b32d87734c154198203637b795991d19 /vendor/lukasreschke/id3parser/src | |
parent | 3c5f840cf0b0995228cb296bbd9de3244d8947b5 (diff) | |
download | volse-hubzilla-84c5f57d2243ff8aa335e37fd5c6cb1b6d64e7d1.tar.gz volse-hubzilla-84c5f57d2243ff8aa335e37fd5c6cb1b6d64e7d1.tar.bz2 volse-hubzilla-84c5f57d2243ff8aa335e37fd5c6cb1b6d64e7d1.zip |
php8: more id3 parser fixes
Diffstat (limited to 'vendor/lukasreschke/id3parser/src')
-rw-r--r-- | vendor/lukasreschke/id3parser/src/getID3/Tags/getid3_id3v2.php | 16 |
1 files changed, 8 insertions, 8 deletions
diff --git a/vendor/lukasreschke/id3parser/src/getID3/Tags/getid3_id3v2.php b/vendor/lukasreschke/id3parser/src/getID3/Tags/getid3_id3v2.php index 1911b6001..a767a5e06 100644 --- a/vendor/lukasreschke/id3parser/src/getID3/Tags/getid3_id3v2.php +++ b/vendor/lukasreschke/id3parser/src/getID3/Tags/getid3_id3v2.php @@ -71,7 +71,7 @@ class getid3_id3v2 extends getid3_handler } - $id3_flags = ord($header{5}); + $id3_flags = ord($header[5]); switch ($id3v2_majorversion) { case 2: // %ab000000 in v2.2 @@ -422,11 +422,11 @@ class getid3_id3v2 extends getid3_handler $footer = $this->fread(10); if (substr($footer, 0, 3) == '3DI') { $thisfile_id3v2['footer'] = true; - $thisfile_id3v2['majorversion_footer'] = ord($footer{3}); - $thisfile_id3v2['minorversion_footer'] = ord($footer{4}); + $thisfile_id3v2['majorversion_footer'] = ord($footer[3]); + $thisfile_id3v2['minorversion_footer'] = ord($footer[4]); } if ($thisfile_id3v2['majorversion_footer'] <= 4) { - $id3_flags = ord(substr($footer{5})); + $id3_flags = ord(substr($footer[5])); $thisfile_id3v2_flags['unsynch_footer'] = (bool) ($id3_flags & 0x80); $thisfile_id3v2_flags['extfoot_footer'] = (bool) ($id3_flags & 0x40); $thisfile_id3v2_flags['experim_footer'] = (bool) ($id3_flags & 0x20); @@ -1025,7 +1025,7 @@ class getid3_id3v2 extends getid3_handler $parsedFrame['lyrics'][$timestampindex]['data'] = substr($frame_remainingdata, $frame_offset, $frame_terminatorpos - $frame_offset); $frame_remainingdata = substr($frame_remainingdata, $frame_terminatorpos + strlen($this->TextEncodingTerminatorLookup($frame_textencoding))); - if (($timestampindex == 0) && (ord($frame_remainingdata{0}) != 0)) { + if (($timestampindex == 0) && (ord($frame_remainingdata[0]) != 0)) { // timestamp probably omitted for first data item } else { $parsedFrame['lyrics'][$timestampindex]['timestamp'] = getid3_lib::BigEndian2Int(substr($frame_remainingdata, 0, 4)); @@ -3334,10 +3334,10 @@ class getid3_id3v2 extends getid3_handler public static function IsANumber($numberstring, $allowdecimal=false, $allownegative=false) { for ($i = 0; $i < strlen($numberstring); $i++) { - if ((chr($numberstring{$i}) < chr('0')) || (chr($numberstring{$i}) > chr('9'))) { - if (($numberstring{$i} == '.') && $allowdecimal) { + if ((chr($numberstring[$i]) < chr('0')) || (chr($numberstring[$i]) > chr('9'))) { + if (($numberstring[$i] == '.') && $allowdecimal) { // allowed - } elseif (($numberstring{$i} == '-') && $allownegative && ($i == 0)) { + } elseif (($numberstring[$i] == '-') && $allownegative && ($i == 0)) { // allowed } else { return false; |