From 2486a9c914520188d751ac30cad91774302f0c01 Mon Sep 17 00:00:00 2001 From: Mario Date: Tue, 25 May 2021 11:15:22 +0000 Subject: php8: fix un maintained id3 parser --- vendor/lukasreschke/id3parser/src/getID3/getid3_lib.php | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'vendor/lukasreschke/id3parser/src/getID3') diff --git a/vendor/lukasreschke/id3parser/src/getID3/getid3_lib.php b/vendor/lukasreschke/id3parser/src/getID3/getid3_lib.php index b50ed30cc..08cb36e03 100644 --- a/vendor/lukasreschke/id3parser/src/getID3/getid3_lib.php +++ b/vendor/lukasreschke/id3parser/src/getID3/getid3_lib.php @@ -85,11 +85,11 @@ class getid3_lib // http://www.scri.fsu.edu/~jac/MAD3401/Backgrnd/binary.html if (strpos($binarypointnumber, '.') === false) { $binarypointnumber = '0.'.$binarypointnumber; - } elseif ($binarypointnumber{0} == '.') { + } elseif ($binarypointnumber[0] == '.') { $binarypointnumber = '0'.$binarypointnumber; } $exponent = 0; - while (($binarypointnumber{0} != '1') || (substr($binarypointnumber, 1, 1) != '.')) { + while (($binarypointnumber[0] != '1') || (substr($binarypointnumber, 1, 1) != '.')) { if (substr($binarypointnumber, 1, 1) == '.') { $exponent--; $binarypointnumber = substr($binarypointnumber, 2, 1).'.'.substr($binarypointnumber, 3); @@ -97,7 +97,7 @@ class getid3_lib $pointpos = strpos($binarypointnumber, '.'); $exponent += ($pointpos - 1); $binarypointnumber = str_replace('.', '', $binarypointnumber); - $binarypointnumber = $binarypointnumber{0}.'.'.substr($binarypointnumber, 1); + $binarypointnumber = $binarypointnumber[0].'.'.substr($binarypointnumber, 1); } } $binarypointnumber = str_pad(substr($binarypointnumber, 0, $maxbits + 2), $maxbits + 2, '0', STR_PAD_RIGHT); -- cgit v1.2.3 From 846d99cfce30a304eef876edb08978b1109c9da4 Mon Sep 17 00:00:00 2001 From: Mario Date: Tue, 25 May 2021 11:24:16 +0000 Subject: php8: more fix unmaintained id3 parser --- vendor/lukasreschke/id3parser/src/getID3/getid3_lib.php | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'vendor/lukasreschke/id3parser/src/getID3') diff --git a/vendor/lukasreschke/id3parser/src/getID3/getid3_lib.php b/vendor/lukasreschke/id3parser/src/getID3/getid3_lib.php index 08cb36e03..377a84508 100644 --- a/vendor/lukasreschke/id3parser/src/getID3/getid3_lib.php +++ b/vendor/lukasreschke/id3parser/src/getID3/getid3_lib.php @@ -166,7 +166,7 @@ class getid3_lib if (!$bitword) { return 0; } - $signbit = $bitword{0}; + $signbit = $bitword[0]; switch (strlen($byteword) * 8) { case 32: @@ -317,7 +317,7 @@ class getid3_lib public static function Bin2Dec($binstring, $signed=false) { $signmult = 1; if ($signed) { - if ($binstring{0} == '1') { + if ($binstring[0] == '1') { $signmult = -1; } $binstring = substr($binstring, 1); -- cgit v1.2.3 From 175001eccdae4fbc92aa95aae74d57cfece6196a Mon Sep 17 00:00:00 2001 From: Mario Date: Tue, 25 May 2021 11:47:26 +0000 Subject: php8: even more fix unmaintained id3 parser --- .../id3parser/src/getID3/getid3_lib.php | 84 +++++++++++----------- 1 file changed, 42 insertions(+), 42 deletions(-) (limited to 'vendor/lukasreschke/id3parser/src/getID3') diff --git a/vendor/lukasreschke/id3parser/src/getID3/getid3_lib.php b/vendor/lukasreschke/id3parser/src/getID3/getid3_lib.php index 377a84508..2cb3b2d09 100644 --- a/vendor/lukasreschke/id3parser/src/getID3/getid3_lib.php +++ b/vendor/lukasreschke/id3parser/src/getID3/getid3_lib.php @@ -183,7 +183,7 @@ class getid3_lib // 80-bit Apple SANE format // http://www.mactech.com/articles/mactech/Vol.06/06.01/SANENormalized/ $exponentstring = substr($bitword, 1, 15); - $isnormalized = intval($bitword{16}); + $isnormalized = intval($bitword[16]); $fractionstring = substr($bitword, 17, 63); $exponent = pow(2, self::Bin2Dec($exponentstring) - 16383); $fraction = $isnormalized + self::DecimalBinary2Float($fractionstring); @@ -243,10 +243,10 @@ class getid3_lib } for ($i = 0; $i < $bytewordlen; $i++) { if ($synchsafe) { // disregard MSB, effectively 7-bit bytes - //$intvalue = $intvalue | (ord($byteword{$i}) & 0x7F) << (($bytewordlen - 1 - $i) * 7); // faster, but runs into problems past 2^31 on 32-bit systems - $intvalue += (ord($byteword{$i}) & 0x7F) * pow(2, ($bytewordlen - 1 - $i) * 7); + //$intvalue = $intvalue | (ord($byteword[$i]) & 0x7F) << (($bytewordlen - 1 - $i) * 7); // faster, but runs into problems past 2^31 on 32-bit systems + $intvalue += (ord($byteword[$i]) & 0x7F) * pow(2, ($bytewordlen - 1 - $i) * 7); } else { - $intvalue += ord($byteword{$i}) * pow(256, ($bytewordlen - 1 - $i)); + $intvalue += ord($byteword[$i]) * pow(256, ($bytewordlen - 1 - $i)); } } if ($signed && !$synchsafe) { @@ -273,7 +273,7 @@ class getid3_lib $binvalue = ''; $bytewordlen = strlen($byteword); for ($i = 0; $i < $bytewordlen; $i++) { - $binvalue .= str_pad(decbin(ord($byteword{$i})), 8, '0', STR_PAD_LEFT); + $binvalue .= str_pad(decbin(ord($byteword[$i]})), 8, '0', STR_PAD_LEFT); } return $binvalue; } @@ -538,7 +538,7 @@ class getid3_lib $newcharstring .= "\xEF\xBB\xBF"; } for ($i = 0; $i < strlen($string); $i++) { - $charval = ord($string{$i}); + $charval = ord($string[$i]); $newcharstring .= self::iconv_fallback_int_utf8($charval); } return $newcharstring; @@ -551,7 +551,7 @@ class getid3_lib $newcharstring .= "\xFE\xFF"; } for ($i = 0; $i < strlen($string); $i++) { - $newcharstring .= "\x00".$string{$i}; + $newcharstring .= "\x00".$string[$i]; } return $newcharstring; } @@ -563,7 +563,7 @@ class getid3_lib $newcharstring .= "\xFF\xFE"; } for ($i = 0; $i < strlen($string); $i++) { - $newcharstring .= $string{$i}."\x00"; + $newcharstring .= $string[$i]."\x00"; } return $newcharstring; } @@ -583,27 +583,27 @@ class getid3_lib $offset = 0; $stringlength = strlen($string); while ($offset < $stringlength) { - if ((ord($string{$offset}) | 0x07) == 0xF7) { + if ((ord($string[$offset]) | 0x07) == 0xF7) { // 11110bbb 10bbbbbb 10bbbbbb 10bbbbbb - $charval = ((ord($string{($offset + 0)}) & 0x07) << 18) & - ((ord($string{($offset + 1)}) & 0x3F) << 12) & - ((ord($string{($offset + 2)}) & 0x3F) << 6) & - (ord($string{($offset + 3)}) & 0x3F); + $charval = ((ord($string[($offset + 0)]) & 0x07) << 18) & + ((ord($string[($offset + 1)]) & 0x3F) << 12) & + ((ord($string[($offset + 2)]) & 0x3F) << 6) & + (ord($string[($offset + 3)]) & 0x3F); $offset += 4; - } elseif ((ord($string{$offset}) | 0x0F) == 0xEF) { + } elseif ((ord($string[$offset]) | 0x0F) == 0xEF) { // 1110bbbb 10bbbbbb 10bbbbbb - $charval = ((ord($string{($offset + 0)}) & 0x0F) << 12) & - ((ord($string{($offset + 1)}) & 0x3F) << 6) & - (ord($string{($offset + 2)}) & 0x3F); + $charval = ((ord($string[($offset + 0)]) & 0x0F) << 12) & + ((ord($string[($offset + 1)]) & 0x3F) << 6) & + (ord($string[($offset + 2)]) & 0x3F); $offset += 3; - } elseif ((ord($string{$offset}) | 0x1F) == 0xDF) { + } elseif ((ord($string[$offset]) | 0x1F) == 0xDF) { // 110bbbbb 10bbbbbb - $charval = ((ord($string{($offset + 0)}) & 0x1F) << 6) & - (ord($string{($offset + 1)}) & 0x3F); + $charval = ((ord($string[($offset + 0)]) & 0x1F) << 6) & + (ord($string[($offset + 1)]) & 0x3F); $offset += 2; - } elseif ((ord($string{$offset}) | 0x7F) == 0x7F) { + } elseif ((ord($string[$offset]) | 0x7F) == 0x7F) { // 0bbbbbbb - $charval = ord($string{$offset}); + $charval = ord($string[$offset]); $offset += 1; } else { // error? throw some kind of warning here? @@ -626,27 +626,27 @@ class getid3_lib $offset = 0; $stringlength = strlen($string); while ($offset < $stringlength) { - if ((ord($string{$offset}) | 0x07) == 0xF7) { + if ((ord($string[$offset]) | 0x07) == 0xF7) { // 11110bbb 10bbbbbb 10bbbbbb 10bbbbbb - $charval = ((ord($string{($offset + 0)}) & 0x07) << 18) & - ((ord($string{($offset + 1)}) & 0x3F) << 12) & - ((ord($string{($offset + 2)}) & 0x3F) << 6) & - (ord($string{($offset + 3)}) & 0x3F); + $charval = ((ord($string[($offset + 0)]) & 0x07) << 18) & + ((ord($string[($offset + 1)]) & 0x3F) << 12) & + ((ord($string[($offset + 2)]) & 0x3F) << 6) & + (ord($string[($offset + 3)]) & 0x3F); $offset += 4; - } elseif ((ord($string{$offset}) | 0x0F) == 0xEF) { + } elseif ((ord($string[$offset]) | 0x0F) == 0xEF) { // 1110bbbb 10bbbbbb 10bbbbbb - $charval = ((ord($string{($offset + 0)}) & 0x0F) << 12) & - ((ord($string{($offset + 1)}) & 0x3F) << 6) & - (ord($string{($offset + 2)}) & 0x3F); + $charval = ((ord($string[($offset + 0)]) & 0x0F) << 12) & + ((ord($string[($offset + 1)]) & 0x3F) << 6) & + (ord($string[($offset + 2)]) & 0x3F); $offset += 3; - } elseif ((ord($string{$offset}) | 0x1F) == 0xDF) { + } elseif ((ord($string[$offset]) | 0x1F) == 0xDF) { // 110bbbbb 10bbbbbb - $charval = ((ord($string{($offset + 0)}) & 0x1F) << 6) & - (ord($string{($offset + 1)}) & 0x3F); + $charval = ((ord($string[($offset + 0)]) & 0x1F) << 6) & + (ord($string[($offset + 1)]) & 0x3F); $offset += 2; - } elseif ((ord($string{$offset}) | 0x7F) == 0x7F) { + } elseif ((ord($string[$offset]) | 0x7F) == 0x7F) { // 0bbbbbbb - $charval = ord($string{$offset}); + $charval = ord($string[$offset]); $offset += 1; } else { // error? throw some kind of warning here? @@ -669,27 +669,27 @@ class getid3_lib $offset = 0; $stringlength = strlen($string); while ($offset < $stringlength) { - if ((ord($string{$offset}) | 0x07) == 0xF7) { + if ((ord($string[$offset]) | 0x07) == 0xF7) { // 11110bbb 10bbbbbb 10bbbbbb 10bbbbbb $charval = ((ord($string{($offset + 0)}) & 0x07) << 18) & ((ord($string{($offset + 1)}) & 0x3F) << 12) & ((ord($string{($offset + 2)}) & 0x3F) << 6) & (ord($string{($offset + 3)}) & 0x3F); $offset += 4; - } elseif ((ord($string{$offset}) | 0x0F) == 0xEF) { + } elseif ((ord($string[$offset]) | 0x0F) == 0xEF) { // 1110bbbb 10bbbbbb 10bbbbbb $charval = ((ord($string{($offset + 0)}) & 0x0F) << 12) & ((ord($string{($offset + 1)}) & 0x3F) << 6) & (ord($string{($offset + 2)}) & 0x3F); $offset += 3; - } elseif ((ord($string{$offset}) | 0x1F) == 0xDF) { + } elseif ((ord($string[$offset]) | 0x1F) == 0xDF) { // 110bbbbb 10bbbbbb $charval = ((ord($string{($offset + 0)}) & 0x1F) << 6) & (ord($string{($offset + 1)}) & 0x3F); $offset += 2; - } elseif ((ord($string{$offset}) | 0x7F) == 0x7F) { + } elseif ((ord($string[$offset]) | 0x7F) == 0x7F) { // 0bbbbbbb - $charval = ord($string{$offset}); + $charval = ord($string[$offset]); $offset += 1; } else { // error? maybe throw some warning here? @@ -886,7 +886,7 @@ class getid3_lib case 'UTF-8': $strlen = strlen($string); for ($i = 0; $i < $strlen; $i++) { - $char_ord_val = ord($string{$i}); + $char_ord_val = ord($string[$i]); $charval = 0; if ($char_ord_val < 0x80) { $charval = $char_ord_val; -- cgit v1.2.3 From d863ba1b2a62ec9f73cc8915dfdb8727368b6b8d Mon Sep 17 00:00:00 2001 From: Mario Date: Tue, 25 May 2021 12:04:32 +0000 Subject: syntax error --- vendor/lukasreschke/id3parser/src/getID3/getid3_lib.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'vendor/lukasreschke/id3parser/src/getID3') diff --git a/vendor/lukasreschke/id3parser/src/getID3/getid3_lib.php b/vendor/lukasreschke/id3parser/src/getID3/getid3_lib.php index 2cb3b2d09..40a1c4ba4 100644 --- a/vendor/lukasreschke/id3parser/src/getID3/getid3_lib.php +++ b/vendor/lukasreschke/id3parser/src/getID3/getid3_lib.php @@ -273,7 +273,7 @@ class getid3_lib $binvalue = ''; $bytewordlen = strlen($byteword); for ($i = 0; $i < $bytewordlen; $i++) { - $binvalue .= str_pad(decbin(ord($byteword[$i]})), 8, '0', STR_PAD_LEFT); + $binvalue .= str_pad(decbin(ord($byteword[$i])), 8, '0', STR_PAD_LEFT); } return $binvalue; } -- cgit v1.2.3 From 51ad4fac01f2cab6cd2e949e61010aa1ebb615f8 Mon Sep 17 00:00:00 2001 From: Mario Date: Tue, 25 May 2021 12:08:58 +0000 Subject: php8: even even more fix unmaintained id3 parser --- .../id3parser/src/getID3/getid3_lib.php | 30 +++++++++++----------- 1 file changed, 15 insertions(+), 15 deletions(-) (limited to 'vendor/lukasreschke/id3parser/src/getID3') diff --git a/vendor/lukasreschke/id3parser/src/getID3/getid3_lib.php b/vendor/lukasreschke/id3parser/src/getID3/getid3_lib.php index 40a1c4ba4..ca7dd30ed 100644 --- a/vendor/lukasreschke/id3parser/src/getID3/getid3_lib.php +++ b/vendor/lukasreschke/id3parser/src/getID3/getid3_lib.php @@ -671,21 +671,21 @@ class getid3_lib while ($offset < $stringlength) { if ((ord($string[$offset]) | 0x07) == 0xF7) { // 11110bbb 10bbbbbb 10bbbbbb 10bbbbbb - $charval = ((ord($string{($offset + 0)}) & 0x07) << 18) & - ((ord($string{($offset + 1)}) & 0x3F) << 12) & - ((ord($string{($offset + 2)}) & 0x3F) << 6) & - (ord($string{($offset + 3)}) & 0x3F); + $charval = ((ord($string[($offset + 0)]) & 0x07) << 18) & + ((ord($string[($offset + 1)]) & 0x3F) << 12) & + ((ord($string[($offset + 2)]) & 0x3F) << 6) & + (ord($string[($offset + 3)]) & 0x3F); $offset += 4; } elseif ((ord($string[$offset]) | 0x0F) == 0xEF) { // 1110bbbb 10bbbbbb 10bbbbbb - $charval = ((ord($string{($offset + 0)}) & 0x0F) << 12) & - ((ord($string{($offset + 1)}) & 0x3F) << 6) & - (ord($string{($offset + 2)}) & 0x3F); + $charval = ((ord($string[($offset + 0)]) & 0x0F) << 12) & + ((ord($string[($offset + 1)]) & 0x3F) << 6) & + (ord($string[($offset + 2)]) & 0x3F); $offset += 3; } elseif ((ord($string[$offset]) | 0x1F) == 0xDF) { // 110bbbbb 10bbbbbb - $charval = ((ord($string{($offset + 0)}) & 0x1F) << 6) & - (ord($string{($offset + 1)}) & 0x3F); + $charval = ((ord($string[($offset + 0)]) & 0x1F) << 6) & + (ord($string[($offset + 1)]) & 0x3F); $offset += 2; } elseif ((ord($string[$offset]) | 0x7F) == 0x7F) { // 0bbbbbbb @@ -892,16 +892,16 @@ class getid3_lib $charval = $char_ord_val; } elseif ((($char_ord_val & 0xF0) >> 4) == 0x0F && $i+3 < $strlen) { $charval = (($char_ord_val & 0x07) << 18); - $charval += ((ord($string{++$i}) & 0x3F) << 12); - $charval += ((ord($string{++$i}) & 0x3F) << 6); - $charval += (ord($string{++$i}) & 0x3F); + $charval += ((ord($string[++$i]) & 0x3F) << 12); + $charval += ((ord($string[++$i]) & 0x3F) << 6); + $charval += (ord($string[++$i]) & 0x3F); } elseif ((($char_ord_val & 0xE0) >> 5) == 0x07 && $i+2 < $strlen) { $charval = (($char_ord_val & 0x0F) << 12); - $charval += ((ord($string{++$i}) & 0x3F) << 6); - $charval += (ord($string{++$i}) & 0x3F); + $charval += ((ord($string[++$i]) & 0x3F) << 6); + $charval += (ord($string[++$i]) & 0x3F); } elseif ((($char_ord_val & 0xC0) >> 6) == 0x03 && $i+1 < $strlen) { $charval = (($char_ord_val & 0x1F) << 6); - $charval += (ord($string{++$i}) & 0x3F); + $charval += (ord($string[++$i]) & 0x3F); } if (($charval >= 32) && ($charval <= 127)) { $HTMLstring .= htmlentities(chr($charval)); -- cgit v1.2.3 From 8d8523684c2a1eed1cdff2573c9fa9bfbb7959de Mon Sep 17 00:00:00 2001 From: Mario Date: Wed, 26 May 2021 08:51:35 +0000 Subject: more id3parser --- vendor/lukasreschke/id3parser/src/getID3/Tags/getid3_id3v2.php | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'vendor/lukasreschke/id3parser/src/getID3') diff --git a/vendor/lukasreschke/id3parser/src/getID3/Tags/getid3_id3v2.php b/vendor/lukasreschke/id3parser/src/getID3/Tags/getid3_id3v2.php index 31742b7f2..1911b6001 100644 --- a/vendor/lukasreschke/id3parser/src/getID3/Tags/getid3_id3v2.php +++ b/vendor/lukasreschke/id3parser/src/getID3/Tags/getid3_id3v2.php @@ -51,8 +51,8 @@ class getid3_id3v2 extends getid3_handler $header = $this->fread(10); if (substr($header, 0, 3) == 'ID3' && strlen($header) == 10) { - $thisfile_id3v2['majorversion'] = ord($header{3}); - $thisfile_id3v2['minorversion'] = ord($header{4}); + $thisfile_id3v2['majorversion'] = ord($header[3]); + $thisfile_id3v2['minorversion'] = ord($header[4]); // shortcut $id3v2_majorversion = &$thisfile_id3v2['majorversion']; -- cgit v1.2.3 From 84c5f57d2243ff8aa335e37fd5c6cb1b6d64e7d1 Mon Sep 17 00:00:00 2001 From: Mario Date: Wed, 26 May 2021 17:54:07 +0000 Subject: php8: more id3 parser fixes --- .../id3parser/src/getID3/Tags/getid3_id3v2.php | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-) (limited to 'vendor/lukasreschke/id3parser/src/getID3') 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; -- cgit v1.2.3 From ff34a787c34c757b8959bbe51a485890e2345902 Mon Sep 17 00:00:00 2001 From: Mario Date: Wed, 26 May 2021 18:02:29 +0000 Subject: php8: more id3 parser fixes --- vendor/lukasreschke/id3parser/src/getID3/Tags/getid3_id3v1.php | 2 +- vendor/lukasreschke/id3parser/src/getID3/Tags/getid3_id3v2.php | 8 ++++---- 2 files changed, 5 insertions(+), 5 deletions(-) (limited to 'vendor/lukasreschke/id3parser/src/getID3') diff --git a/vendor/lukasreschke/id3parser/src/getID3/Tags/getid3_id3v1.php b/vendor/lukasreschke/id3parser/src/getID3/Tags/getid3_id3v1.php index 18e850af1..944885b4f 100644 --- a/vendor/lukasreschke/id3parser/src/getID3/Tags/getid3_id3v1.php +++ b/vendor/lukasreschke/id3parser/src/getID3/Tags/getid3_id3v1.php @@ -39,7 +39,7 @@ class getid3_id3v1 extends getid3_handler // If second-last byte of comment field is null and last byte of comment field is non-null // then this is ID3v1.1 and the comment field is 28 bytes long and the 30th byte is the track number - if (($id3v1tag{125} === "\x00") && ($id3v1tag{126} !== "\x00")) { + if (($id3v1tag[125] === "\x00") && ($id3v1tag[126] !== "\x00")) { $ParsedID3v1['track'] = ord(substr($ParsedID3v1['comment'], 29, 1)); $ParsedID3v1['comment'] = substr($ParsedID3v1['comment'], 0, 28); } diff --git a/vendor/lukasreschke/id3parser/src/getID3/Tags/getid3_id3v2.php b/vendor/lukasreschke/id3parser/src/getID3/Tags/getid3_id3v2.php index a767a5e06..c1e982137 100644 --- a/vendor/lukasreschke/id3parser/src/getID3/Tags/getid3_id3v2.php +++ b/vendor/lukasreschke/id3parser/src/getID3/Tags/getid3_id3v2.php @@ -252,7 +252,7 @@ class getid3_id3v2 extends getid3_handler $thisfile_id3v2['padding']['length'] = strlen($framedata); $thisfile_id3v2['padding']['valid'] = true; for ($i = 0; $i < $thisfile_id3v2['padding']['length']; $i++) { - if ($framedata{$i} != "\x00") { + if ($framedata[$i] != "\x00") { $thisfile_id3v2['padding']['valid'] = false; $thisfile_id3v2['padding']['errorpos'] = $thisfile_id3v2['padding']['start'] + $i; $info['warning'][] = 'Invalid ID3v2 padding found at offset '.$thisfile_id3v2['padding']['errorpos'].' (the remaining '.($thisfile_id3v2['padding']['length'] - $i).' bytes are considered invalid)'; @@ -314,7 +314,7 @@ class getid3_id3v2 extends getid3_handler $len = strlen($framedata); for ($i = 0; $i < $len; $i++) { - if ($framedata{$i} != "\x00") { + if ($framedata[$i]!= "\x00") { $thisfile_id3v2['padding']['valid'] = false; $thisfile_id3v2['padding']['errorpos'] = $thisfile_id3v2['padding']['start'] + $i; $info['warning'][] = 'Invalid ID3v2 padding found at offset '.$thisfile_id3v2['padding']['errorpos'].' (the remaining '.($thisfile_id3v2['padding']['length'] - $i).' bytes are considered invalid)'; @@ -648,7 +648,7 @@ class getid3_id3v2 extends getid3_handler //unset($parsedFrame['data']); do not unset, may be needed elsewhere, e.g. for replaygain - } elseif ($parsedFrame['frame_name']{0} == 'T') { // 4.2. T??[?] Text information frame + } elseif ($parsedFrame['frame_name'][0] == 'T') { // 4.2. T??[?] Text information frame // There may only be one text information frame of its kind in an tag. //
@@ -750,7 +750,7 @@ class getid3_id3v2 extends getid3_handler unset($parsedFrame['data']); - } elseif ($parsedFrame['frame_name']{0} == 'W') { // 4.3. W??? URL link frames + } elseif ($parsedFrame['frame_name'][0] == 'W') { // 4.3. W??? URL link frames // There may only be one URL link frame of its kind in a tag, // except when stated otherwise in the frame description //