diff --git a/lib/Common/BitMatrix.php b/lib/Common/BitMatrix.php index 112862d..dec4509 100644 --- a/lib/Common/BitMatrix.php +++ b/lib/Common/BitMatrix.php @@ -39,7 +39,7 @@ public static function parse($stringRepresentation, $setString, $unsetString) $nRows = 0; $pos = 0; while ($pos < strlen($stringRepresentation)) { - if ($stringRepresentation{$pos} == '\n' || + if ($stringRepresentation[$pos] == '\n' || $stringRepresentation->{$pos} == '\r') { if ($bitsPos > $rowStartPos) { if ($rowLength == -1) { diff --git a/lib/Qrcode/Decoder/DecodedBitStreamParser.php b/lib/Qrcode/Decoder/DecodedBitStreamParser.php index 75e5942..a0afdf4 100644 --- a/lib/Qrcode/Decoder/DecodedBitStreamParser.php +++ b/lib/Qrcode/Decoder/DecodedBitStreamParser.php @@ -266,8 +266,8 @@ private static function decodeAlphanumericSegment($bits, if ($fc1InEffect) { // We need to massage the result a bit if in an FNC1 mode: for ($i = $start; $i < strlen($result); $i++) { - if ($result{$i} == '%') { - if ($i < strlen($result) - 1 && $result{$i + 1} == '%') { + if ($result[$i] == '%') { + if ($i < strlen($result) - 1 && $result[$i + 1] == '%') { // %% is rendered as % $result = substr_replace($result, '', $i + 1, 1);//deleteCharAt(i + 1); } else {