Skip to content

Commit 89b57f2

Browse files
authored
Merge pull request #78 from andreybolonin/master
fix php 7.4 deprecations
2 parents b934ef5 + e3e100a commit 89b57f2

File tree

2 files changed

+3
-3
lines changed

2 files changed

+3
-3
lines changed

lib/Common/BitMatrix.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -39,7 +39,7 @@ public static function parse($stringRepresentation, $setString, $unsetString)
3939
$nRows = 0;
4040
$pos = 0;
4141
while ($pos < strlen($stringRepresentation)) {
42-
if ($stringRepresentation{$pos} == '\n' ||
42+
if ($stringRepresentation[$pos] == '\n' ||
4343
$stringRepresentation->{$pos} == '\r') {
4444
if ($bitsPos > $rowStartPos) {
4545
if ($rowLength == -1) {

lib/Qrcode/Decoder/DecodedBitStreamParser.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -266,8 +266,8 @@ private static function decodeAlphanumericSegment($bits,
266266
if ($fc1InEffect) {
267267
// We need to massage the result a bit if in an FNC1 mode:
268268
for ($i = $start; $i < strlen($result); $i++) {
269-
if ($result{$i} == '%') {
270-
if ($i < strlen($result) - 1 && $result{$i + 1} == '%') {
269+
if ($result[$i] == '%') {
270+
if ($i < strlen($result) - 1 && $result[$i + 1] == '%') {
271271
// %% is rendered as %
272272
$result = substr_replace($result, '', $i + 1, 1);//deleteCharAt(i + 1);
273273
} else {

0 commit comments

Comments
 (0)