Skip to content

Commit

Permalink
Fix "Array and string offset access syntax with curly braces is depre…
Browse files Browse the repository at this point in the history
…cated"
  • Loading branch information
thekid committed Dec 2, 2019
1 parent 1526dce commit 59cc869
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions src/main/php/text/csv/CsvReader.class.php
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
<?php namespace text\csv;

use io\streams\TextReader;
use lang\IllegalStateException;
use lang\FormatException;
use lang\IllegalStateException;
use lang\Throwable;

/**
Expand Down Expand Up @@ -92,7 +92,7 @@ protected function readValues($raw= false) {
if ($b >= $l) {
$value= '';
$e= 0;
} else if ($this->quote === $line{$b}) {
} else if ($this->quote === $line[$b]) {

// Find end of quoted value (= quote not preceded by quote)
$q= $b + 1;
Expand Down Expand Up @@ -121,11 +121,11 @@ protected function readValues($raw= false) {
$value= str_replace($escape, $this->quote, substr($line, $b + 1, $e));
$e+= 2;
$e+= strspn($line, self::WHITESPACE, $b+ $e); // Skip trailing WS
if ($b + $e < $l && $this->delimiter !== $line{$b + $e}) {
if ($b + $e < $l && $this->delimiter !== $line[$b + $e]) {
$this->raise(sprintf(
'Illegal quoting, expected [%s or <END>], have [%s] beginning at line %d',
$this->delimiter,
$line{$b + $e},
$line[$b + $e],
$bl
));
}
Expand Down

0 comments on commit 59cc869

Please sign in to comment.