From c13abec42eace759987846be5cf5456b8ea3b0e5 Mon Sep 17 00:00:00 2001 From: Richard Jacobse Date: Fri, 4 Jun 2021 14:54:56 +0200 Subject: [PATCH] fix: Curly bracket array acces --- Util/Base1DBarcode.php | 126 ++++++++++++++++++------------------ Util/Plugins/datamatrix.php | 16 ++--- Util/Plugins/pdf417.php | 20 +++--- 3 files changed, 81 insertions(+), 81 deletions(-) diff --git a/Util/Base1DBarcode.php b/Util/Base1DBarcode.php index adb99be..70efc32 100644 --- a/Util/Base1DBarcode.php +++ b/Util/Base1DBarcode.php @@ -288,7 +288,7 @@ public function getBarcodePNGPath($code, $type, $w=2, $h=30, $color=array(0,0,0) if (is_null($filename)){ $filename = $type.'_'.$code; } - + $this->setBarcode($code, $type); $bar = null; @@ -573,7 +573,7 @@ protected function barcode_code39($code, $extended=false, $checksum=false) $k = 0; $clen = strlen($code); for ($i = 0; $i < $clen; ++$i) { - $char = $code{$i}; + $char = $code[$i]; if (!isset($chr[$char])) { // invalid character return false; @@ -584,7 +584,7 @@ protected function barcode_code39($code, $extended=false, $checksum=false) } else { $t = false; // space } - $w = $chr[$char]{$j}; + $w = $chr[$char][$j]; $bararray['bcode'][$k] = array('t' => $t, 'w' => $w, 'h' => 1, 'p' => 0); $bararray['maxw'] += $w; ++$k; @@ -643,10 +643,10 @@ protected function encode_code39_ext($code) $codeExt = ''; $clen = strlen($code); for ($i = 0; $i < $clen; ++$i) { - if (ord($code{$i}) > 127) { + if (ord($code[$i]) > 127) { return false; } - $codeExt .= $encode[$code{$i}]; + $codeExt .= $encode[$code[$i]]; } return $codeExt; @@ -669,7 +669,7 @@ protected function checksum_code39($code) $sum = 0; $clen = strlen($code); for ($i = 0; $i < $clen; ++$i) { - $k = array_keys($chars, $code{$i}); + $k = array_keys($chars, $code[$i]); $sum += $k[0]; } $j = ($sum % 43); @@ -773,10 +773,10 @@ protected function barcode_code93($code) $clen = strlen($code); for ($i = 0; $i < $clen; ++$i) { - if (ord($code{$i}) > 127) { + if (ord($code[$i]) > 127) { return false; } - $codeExt .= $encode[$code{$i}]; + $codeExt .= $encode[$code[$i]]; } // checksum @@ -787,7 +787,7 @@ protected function barcode_code93($code) $k = 0; $clen = strlen($code); for ($i = 0; $i < $clen; ++$i) { - $char = ord($code{$i}); + $char = ord($code[$i]); if (!isset($chr[$char])) { // invalid character return false; @@ -798,7 +798,7 @@ protected function barcode_code93($code) } else { $t = false; // space } - $w = $chr[$char]{$j}; + $w = $chr[$char][$j]; $bararray['bcode'][$k] = array('t' => $t, 'w' => $w, 'h' => 1, 'p' => 0); $bararray['maxw'] += $w; ++$k; @@ -832,7 +832,7 @@ protected function checksum_code93($code) $p = 1; $check = 0; for ($i = ($len - 1); $i >= 0; --$i) { - $k = array_keys($chars, $code{$i}); + $k = array_keys($chars, $code[$i]); $check += ($k[0] * $p); ++$p; if ($p > 20) { @@ -846,7 +846,7 @@ protected function checksum_code93($code) $p = 1; $check = 0; for ($i = $len; $i >= 0; --$i) { - $k = array_keys($chars, $code{$i}); + $k = array_keys($chars, $code[$i]); $check += ($k[0] * $p); ++$p; if ($p > 15) { @@ -874,11 +874,11 @@ protected function checksum_s25($code) $len = strlen($code); $sum = 0; for ($i = 0; $i < $len; $i+=2) { - $sum += $code{$i}; + $sum += $code[$i]; } $sum *= 3; for ($i = 1; $i < $len; $i+=2) { - $sum += ($code{$i}); + $sum += ($code[$i]); } $r = $sum % 10; if ($r > 0) { @@ -921,7 +921,7 @@ protected function barcode_msi($code, $checksum=false) $p = 2; $check = 0; for ($i = ($clen - 1); $i >= 0; --$i) { - $check += (hexdec($code{$i}) * $p); + $check += (hexdec($code[$i]) * $p); ++$p; if ($p > 7) { $p = 2; @@ -936,7 +936,7 @@ protected function barcode_msi($code, $checksum=false) $seq = '110'; // left guard $clen = strlen($code); for ($i = 0; $i < $clen; ++$i) { - $digit = $code{$i}; + $digit = $code[$i]; if (!isset($chr[$digit])) { // invalid character return false; @@ -982,7 +982,7 @@ protected function barcode_s25($code, $checksum=false) $seq = '11011010'; $clen = strlen($code); for ($i = 0; $i < $clen; ++$i) { - $digit = $code{$i}; + $digit = $code[$i]; if (!isset($chr[$digit])) { // invalid character return false; @@ -1010,8 +1010,8 @@ protected function binseq_to_array($seq, $bararray) $k = 0; for ($i = 0; $i < $len; ++$i) { $w += 1; - if (($i == ($len - 1)) || (($i < ($len - 1)) && ($seq{$i} != $seq{($i+1)}))) { - if ($seq{$i} == '1') { + if (($i == ($len - 1)) || (($i < ($len - 1)) && ($seq[$i] != $seq[($i + 1)]))) { + if ($seq[$i] == '1') { $t = true; // bar } else { $t = false; // space @@ -1065,8 +1065,8 @@ protected function barcode_i25($code, $checksum=false) $k = 0; $clen = strlen($code); for ($i = 0; $i < $clen; $i = ($i + 2)) { - $charBar = $code{$i}; - $charSpace = $code{$i+1}; + $charBar = $code[$i]; + $charSpace = $code[$i + 1]; if ((!isset($chr[$charBar])) || (!isset($chr[$charSpace]))) { // invalid character return false; @@ -1075,7 +1075,7 @@ protected function barcode_i25($code, $checksum=false) $seq = ''; $chrlen = strlen($chr[$charBar]); for ($s = 0; $s < $chrlen; $s++) { - $seq .= $chr[$charBar]{$s} . $chr[$charSpace]{$s}; + $seq .= $chr[$charBar][$s] . $chr[$charSpace][$s]; } $seqlen = strlen($seq); for ($j = 0; $j < $seqlen; ++$j) { @@ -1084,7 +1084,7 @@ protected function barcode_i25($code, $checksum=false) } else { $t = false; // space } - $w = $seq{$j}; + $w = $seq[$j]; $bararray['bcode'][$k] = array('t' => $t, 'w' => $w, 'h' => 1, 'p' => 0); $bararray['maxw'] += $w; ++$k; @@ -1235,7 +1235,7 @@ protected function barcode_c128($code, $type='') case 'A': // MODE A $startid = 103; for ($i = 0; $i < $len; ++$i) { - $char = $code{$i}; + $char = $code[$i]; $charId = ord($char); if (($charId >= 241) && ($charId <= 244)) { $codeData[] = $fncA[$charId]; @@ -1250,7 +1250,7 @@ protected function barcode_c128($code, $type='') case 'B': // MODE B $startid = 104; for ($i = 0; $i < $len; ++$i) { - $char = $code{$i}; + $char = $code[$i]; $charId = ord($char); if (($charId >= 241) && ($charId <= 244)) { $codeData[] = $fncB[$charId]; @@ -1264,7 +1264,7 @@ protected function barcode_c128($code, $type='') case 'C': // MODE C $startid = 105; - if (ord($code{0}) == 241) { + if (ord($code[0]) == 241) { $codeData[] = 102; $code = substr($code, 1); --$len; @@ -1274,7 +1274,7 @@ protected function barcode_c128($code, $type='') return false; } for ($i = 0; $i < $len; $i+=2) { - $chrnum = $code{$i}.$code{$i+1}; + $chrnum = $code[$i] . $code[$i + 1]; if (preg_match('/([0-9]{2})/', $chrnum) > 0) { $codeData[] = intval($chrnum); } else { @@ -1330,7 +1330,7 @@ protected function barcode_c128($code, $type='') } } for ($i = 0; $i < $seq[2]; ++$i) { - $char = $seq[1]{$i}; + $char = $seq[1][$i]; $charId = ord($char); if (($charId >= 241) && ($charId <= 244)) { $codeData[] = $fncA[$charId]; @@ -1342,7 +1342,7 @@ protected function barcode_c128($code, $type='') case 'B': if ($key == 0) { - $tmpchr = ord($seq[1]{0}); + $tmpchr = ord($seq[1][0]); if (($seq[2] == 1) && ($tmpchr >= 241) && ($tmpchr <= 244) && isset($sequence[($key + 1)]) && ($sequence[($key + 1)][0] != 'B')) { switch ($sequence[($key + 1)][0]) { case 'A': @@ -1373,7 +1373,7 @@ protected function barcode_c128($code, $type='') } } for ($i = 0; $i < $seq[2]; ++$i) { - $char = $seq[1]{$i}; + $char = $seq[1][$i]; $charId = ord($char); if (($charId >= 241) && ($charId <= 244)) { $codeData[] = $fncB[$charId]; @@ -1390,7 +1390,7 @@ protected function barcode_c128($code, $type='') $codeData[] = 99; } for ($i = 0; $i < $seq[2]; $i+=2) { - $chrnum = $seq[1]{$i}.$seq[1]{$i+1}; + $chrnum = $seq[1][$i] . $seq[1][$i + 1]; $codeData[] = intval($chrnum); } break; @@ -1419,7 +1419,7 @@ protected function barcode_c128($code, $type='') } else { $t = false; // space } - $w = $seq{$j}; + $w = $seq[$j]; $bararray['bcode'][] = array('t' => $t, 'w' => $w, 'h' => 1, 'p' => 0); $bararray['maxw'] += $w; } @@ -1493,14 +1493,14 @@ protected function barcode_eanupc($code, $len=13) // calculate check digit $sumA = 0; for ($i = 1; $i < $dataLen; $i+=2) { - $sumA += $code{$i}; + $sumA += $code[$i]; } if ($len > 12) { $sumA *= 3; } $sumB = 0; for ($i = 0; $i < $dataLen; $i+=2) { - $sumB += ($code{$i}); + $sumB += ($code[$i]); } if ($len < 13) { $sumB *= 3; @@ -1512,7 +1512,7 @@ protected function barcode_eanupc($code, $len=13) if ($codeLen == $dataLen) { // add check digit $code .= $r; - } elseif ($r !== intval($code{$dataLen})) { + } elseif ($r !== intval($code[$dataLen])) { // wrong checkdigit return false; } @@ -1621,9 +1621,9 @@ protected function barcode_eanupc($code, $len=13) $seq = '101'; // left guard bar if ($upce) { $bararray = array('code' => $upceCode, 'maxw' => 0, 'maxh' => 1, 'bcode' => array()); - $p = $upceParities[$code{1}][$r]; + $p = $upceParities[$code[1]][$r]; for ($i = 0; $i < 6; ++$i) { - $seq .= $codes[$p[$i]][$upceCode{$i}]; + $seq .= $codes[$p[$i]][$upceCode[$i]]; } $seq .= '010101'; // right guard bar } else { @@ -1631,17 +1631,17 @@ protected function barcode_eanupc($code, $len=13) $halfLen = ceil($len / 2); if ($len == 8) { for ($i = 0; $i < $halfLen; ++$i) { - $seq .= $codes['A'][$code{$i}]; + $seq .= $codes['A'][$code[$i]]; } } else { - $p = $parities[$code{0}]; + $p = $parities[$code[0]]; for ($i = 1; $i < $halfLen; ++$i) { - $seq .= $codes[$p[$i-1]][$code{$i}]; + $seq .= $codes[$p[$i-1]][$code[$i]]; } } $seq .= '01010'; // center guard bar for ($i = $halfLen; $i < $len; ++$i) { - $seq .= $codes['C'][$code{intval($i)}]; + $seq .= $codes['C'][$code[intval($i)]]; } $seq .= '101'; // right guard bar } @@ -1649,8 +1649,8 @@ protected function barcode_eanupc($code, $len=13) $w = 0; for ($i = 0; $i < $clen; ++$i) { $w += 1; - if (($i == ($clen - 1)) || (($i < ($clen - 1)) && ($seq{$i} != $seq{($i+1)}))) { - if ($seq{$i} == '1') { + if (($i == ($clen - 1)) || (($i < ($clen - 1)) && ($seq[$i] != $seq[($i + 1)]))) { + if ($seq[$i] == '1') { $t = true; // bar } else { $t = false; // space @@ -1683,7 +1683,7 @@ protected function barcode_eanext($code, $len=5) if ($len == 2) { $r = $code % 4; } elseif ($len == 5) { - $r = (3 * ($code{0} + $code{2} + $code{4})) + (9 * ($code{1} + $code{3})); + $r = (3 * ($code[0] + $code[2] + $code[4])) + (9 * ($code[1] + $code[3])); $r %= 10; } else { return false; @@ -1734,10 +1734,10 @@ protected function barcode_eanext($code, $len=5) ); $p = $parities[$len][$r]; $seq = '1011'; // left guard bar - $seq .= $codes[$p[0]][$code{0}]; + $seq .= $codes[$p[0]][$code[0]]; for ($i = 1; $i < $len; ++$i) { $seq .= '01'; // separator - $seq .= $codes[$p[$i]][$code{$i}]; + $seq .= $codes[$p[$i]][$code[$i]]; } $bararray = array('code' => $code, 'maxw' => 0, 'maxh' => 1, 'bcode' => array()); @@ -1791,7 +1791,7 @@ protected function barcode_postnet($code, $planet=false) // calculate checksum $sum = 0; for ($i = 0; $i < $len; ++$i) { - $sum += intval($code{$i}); + $sum += intval($code[$i]); } $chkd = ($sum % 10); if ($chkd > 0) { @@ -1805,7 +1805,7 @@ protected function barcode_postnet($code, $planet=false) $bararray['maxw'] += 2; for ($i = 0; $i < $len; ++$i) { for ($j = 0; $j < 5; ++$j) { - $h = $barlen[$code{$i}][$j]; + $h = $barlen[$code[$i]][$j]; $p = floor(1 / $h); $bararray['bcode'][$k++] = array('t' => 1, 'w' => 1, 'h' => $h, 'p' => $p); $bararray['bcode'][$k++] = array('t' => 0, 'w' => 1, 'h' => 2, 'p' => 0); @@ -1921,8 +1921,8 @@ protected function barcode_rms4cc($code, $kix=false) $row = 0; $col = 0; for ($i = 0; $i < $len; ++$i) { - $row += $checktable[$code{$i}][0]; - $col += $checktable[$code{$i}][1]; + $row += $checktable[$code[$i]][0]; + $col += $checktable[$code[$i]][1]; } $row %= 6; $col %= 6; @@ -1943,7 +1943,7 @@ protected function barcode_rms4cc($code, $kix=false) for ($i = 0; $i < $len; ++$i) { for ($j = 0; $j < 4; ++$j) { - switch ($barmode[$code{$i}][$j]) { + switch ($barmode[$code[$i]][$j]) { case 1: $p = 0; $h = 2; @@ -2017,17 +2017,17 @@ protected function barcode_codabar($code) $code = 'A'.strtoupper($code).'A'; $len = strlen($code); for ($i = 0; $i < $len; ++$i) { - if (!isset($chr[$code{$i}])) { + if (!isset($chr[$code[$i]])) { return false; } - $seq = $chr[$code{$i}]; + $seq = $chr[$code[$i]]; for ($j = 0; $j < 8; ++$j) { if (($j % 2) == 0) { $t = true; // bar } else { $t = false; // space } - $w = $seq{$j}; + $w = $seq[$j]; $bararray['bcode'][$k] = array('t' => $t, 'w' => $w, 'h' => 1, 'p' => 0); $bararray['maxw'] += $w; ++$k; @@ -2070,7 +2070,7 @@ protected function barcode_code11($code) $p = 1; $check = 0; for ($i = ($len - 1); $i >= 0; --$i) { - $digit = $code{$i}; + $digit = $code[$i]; if ($digit == '-') { $dval = 10; } else { @@ -2092,7 +2092,7 @@ protected function barcode_code11($code) $p = 1; $check = 0; for ($i = $len; $i >= 0; --$i) { - $digit = $code{$i}; + $digit = $code[$i]; if ($digit == '-') { $dval = 10; } else { @@ -2111,17 +2111,17 @@ protected function barcode_code11($code) $code = 'S'.$code.'S'; $len += 3; for ($i = 0; $i < $len; ++$i) { - if (!isset($chr[$code{$i}])) { + if (!isset($chr[$code[$i]])) { return false; } - $seq = $chr[$code{$i}]; + $seq = $chr[$code[$i]]; for ($j = 0; $j < 6; ++$j) { if (($j % 2) == 0) { $t = true; // bar } else { $t = false; // space } - $w = $seq{$j}; + $w = $seq[$j]; $bararray['bcode'][$k] = array('t' => $t, 'w' => $w, 'h' => 1, 'p' => 0); $bararray['maxw'] += $w; ++$k; @@ -2198,7 +2198,7 @@ protected function barcode_pharmacode2t($code) $bararray = array('code' => $code, 'maxw' => 0, 'maxh' => 2, 'bcode' => array()); $len = strlen($seq); for ($i = 0; $i < $len; ++$i) { - switch ($seq{$i}) { + switch ($seq[$i]) { case '1': $p = 1; $h = 1; @@ -2271,9 +2271,9 @@ protected function barcode_imb($code) } $binaryCode = bcmul($binaryCode, 10); - $binaryCode = bcadd($binaryCode, $trackingNumber{0}); + $binaryCode = bcadd($binaryCode, $trackingNumber[0]); $binaryCode = bcmul($binaryCode, 5); - $binaryCode = bcadd($binaryCode, $trackingNumber{1}); + $binaryCode = bcadd($binaryCode, $trackingNumber[1]); $binaryCode .= substr($trackingNumber, 2, 18); // convert to hexadecimal $binaryCode = $this->dec_to_hex($binaryCode); @@ -2393,7 +2393,7 @@ public function hex_to_dec($hex) $bitval = 1; $len = strlen($hex); for ($pos = ($len - 1); $pos >= 0; --$pos) { - $dec = bcadd($dec, bcmul(hexdec($hex{$pos}), $bitval)); + $dec = bcadd($dec, bcmul(hexdec($hex[$pos]), $bitval)); $bitval = bcmul($bitval, 16); } diff --git a/Util/Plugins/datamatrix.php b/Util/Plugins/datamatrix.php index e6a529e..e855e02 100644 --- a/Util/Plugins/datamatrix.php +++ b/Util/Plugins/datamatrix.php @@ -479,7 +479,7 @@ protected function lookAheadTest($data, $pos, $mode) return self::ENC_C40; } // get char - $chr = ord($data{($pos + $charscount)}); + $chr = ord($data[($pos + $charscount)]); $charscount++; // STEP L if ($this->isCharMode($chr, self::ENC_ASCII_NUM)) { @@ -554,7 +554,7 @@ protected function lookAheadTest($data, $pos, $mode) if ($numch[self::ENC_C40] == $numch[self::ENC_X12]) { $k = ($pos + $charscount + 1); while ($k < $dataLength) { - $tmpchr = ord($data{$k}); + $tmpchr = ord($data[$k]); if ($this->isCharMode($tmpchr, self::ENC_X12)) { return self::ENC_X12; } elseif (!($this->isCharMode($tmpchr, self::ENC_X12) || $this->isCharMode($tmpchr, self::ENC_C40))) { @@ -650,7 +650,7 @@ protected function getHighLevelEncoding($data) while ($pos < $dataLenght) { switch ($enc) { case self::ENC_ASCII : // STEP B. While in ASCII encodation - if (($dataLenght > 1) && ($pos < ($dataLenght - 1)) && ($this->isCharMode(ord($data{($pos)}), self::ENC_ASCII_NUM) && $this->isCharMode(ord($data{($pos + 1)}), self::ENC_ASCII_NUM))) { + if (($dataLenght > 1) && ($pos < ($dataLenght - 1)) && ($this->isCharMode(ord($data[($pos)]), self::ENC_ASCII_NUM) && $this->isCharMode(ord($data[($pos + 1)]), self::ENC_ASCII_NUM))) { // 1. If the next data sequence is at least 2 consecutive digits, encode the next two digits as a double digit in ASCII mode. $cw[] = (intval(substr($data, $pos, 2)) + 130); ++$cwNum; @@ -665,7 +665,7 @@ protected function getHighLevelEncoding($data) ++$cwNum; } else { // get new byte - $chr = ord($data{($pos)}); + $chr = ord($data[($pos)]); ++$pos; if ($this->isCharMode($chr, self::ENC_ASCII_EXT)) { // 3. If the next data character is extended ASCII (greater than 127) encode it in ASCII mode first using the Upper Shift (value 235) character. @@ -692,7 +692,7 @@ protected function getHighLevelEncoding($data) $charset = $this->chset[$setId]; do { // 2. process the next character in C40 encodation. - $chr = ord($data{($epos)}); + $chr = ord($data[($epos)]); ++$epos; // check for extended character if ($chr & 0x80) { @@ -787,7 +787,7 @@ protected function getHighLevelEncoding($data) $fieldLenght = 0; while ($epos < $dataLenght) { // 2. process the next character in EDIFACT encodation. - $chr = ord($data{($epos)}); + $chr = ord($data[($epos)]); ++$epos; $tempCw[] = $chr; ++$fieldLenght; @@ -846,7 +846,7 @@ protected function getHighLevelEncoding($data) break; // exit from B256 mode } else { // 2. Otherwise, process the next character in Base 256 encodation. - $chr = ord($data{($pos)}); + $chr = ord($data[($pos)]); ++$pos; $tempCw[] = $chr; ++$fieldLenght; @@ -1093,4 +1093,4 @@ protected function getPlacemetMap($nrow, $ncol) return $marr; } -} \ No newline at end of file +} diff --git a/Util/Plugins/pdf417.php b/Util/Plugins/pdf417.php index ef09e53..2c3a049 100644 --- a/Util/Plugins/pdf417.php +++ b/Util/Plugins/pdf417.php @@ -4477,7 +4477,7 @@ protected function getCompaction($mode, $code, $addmode = true) $txtarr = array(); // array of characters and sub-mode switching characters $codelen = strlen($code); for ($i = 0; $i < $codelen; ++$i) { - $chval = ord($code{$i}); + $chval = ord($code[$i]); if (($k = array_search($chval, $this->textsubmodes[$submode])) !== false) { // we are on the same sub-mode $txtarr[] = $k; @@ -4487,7 +4487,7 @@ protected function getCompaction($mode, $code, $addmode = true) // search new sub-mode if (($s != $submode) && (($k = array_search($chval, $this->textsubmodes[$s])) !== false)) { // $s is the new submode - if (((($i + 1) == $codelen) || ((($i + 1) < $codelen) && (array_search(ord($code{($i + 1)}), $this->textsubmodes[$submode]) !== false))) && (($s == 3) || (($s == 0) && ($submode == 1)))) { + if (((($i + 1) == $codelen) || ((($i + 1) < $codelen) && (array_search(ord($code[($i + 1)]), $this->textsubmodes[$submode]) !== false))) && (($s == 3) || (($s == 0) && ($submode == 1)))) { // shift (temporary change only for this char) if ($s == 3) { // shift to puntuaction @@ -4533,12 +4533,12 @@ protected function getCompaction($mode, $code, $addmode = true) } if ($sublen == 6) { - $t = bcmul('' . ord($code{0}), '1099511627776'); - $t = bcadd($t, bcmul('' . ord($code{1}), '4294967296')); - $t = bcadd($t, bcmul('' . ord($code{2}), '16777216')); - $t = bcadd($t, bcmul('' . ord($code{3}), '65536')); - $t = bcadd($t, bcmul('' . ord($code{4}), '256')); - $t = bcadd($t, '' . ord($code{5})); + $t = bcmul('' . ord($code[0]), '1099511627776'); + $t = bcadd($t, bcmul('' . ord($code[1]), '4294967296')); + $t = bcadd($t, bcmul('' . ord($code[2]), '16777216')); + $t = bcadd($t, bcmul('' . ord($code[3]), '65536')); + $t = bcadd($t, bcmul('' . ord($code[4]), '256')); + $t = bcadd($t, '' . ord($code[5])); do { $d = bcmod($t, '900'); $t = bcdiv($t, '900'); @@ -4546,7 +4546,7 @@ protected function getCompaction($mode, $code, $addmode = true) } while ($t != '0'); } else { for ($i = 0; $i < $sublen; ++$i) { - $cw[] = ord($code{$i}); + $cw[] = ord($code[$i]); } } @@ -4584,4 +4584,4 @@ protected function getCompaction($mode, $code, $addmode = true) return $cw; } -} \ No newline at end of file +}