mirror of
https://github.com/tecnickcom/TCPDF.git
synced 2025-03-20 22:19:39 +01:00
Merge pull request #178 from Findus23/some-more-curly-brace-fixes
fix curly braces in pdf417
This commit is contained in:
commit
51ae053e81
@ -878,7 +878,7 @@ class PDF417 {
|
||||
$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;
|
||||
@ -888,7 +888,7 @@ class PDF417 {
|
||||
// search new sub-mode
|
||||
if (($s != $submode) AND (($k = array_search($chval, $this->textsubmodes[$s])) !== false)) {
|
||||
// $s is the new submode
|
||||
if (((($i + 1) == $codelen) OR ((($i + 1) < $codelen) AND (array_search(ord($code{($i + 1)}), $this->textsubmodes[$submode]) !== false))) AND (($s == 3) OR (($s == 0) AND ($submode == 1)))) {
|
||||
if (((($i + 1) == $codelen) OR ((($i + 1) < $codelen) AND (array_search(ord($code[($i + 1)]), $this->textsubmodes[$submode]) !== false))) AND (($s == 3) OR (($s == 0) AND ($submode == 1)))) {
|
||||
// shift (temporary change only for this char)
|
||||
if ($s == 3) {
|
||||
// shift to puntuaction
|
||||
@ -952,7 +952,7 @@ class PDF417 {
|
||||
$cw = array_merge($cw, $cw6);
|
||||
} else {
|
||||
for ($i = 0; $i < $sublen; ++$i) {
|
||||
$cw[] = ord($code{$i});
|
||||
$cw[] = ord($code[$i]);
|
||||
}
|
||||
}
|
||||
$code = $rest;
|
||||
|
Loading…
x
Reference in New Issue
Block a user