diff --git a/src/main/php/text/csv/CsvReader.class.php b/src/main/php/text/csv/CsvReader.class.php index 7fc5b74c..e1aa6e74 100644 --- a/src/main/php/text/csv/CsvReader.class.php +++ b/src/main/php/text/csv/CsvReader.class.php @@ -1,8 +1,8 @@ = $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; @@ -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 ], have [%s] beginning at line %d', $this->delimiter, - $line{$b + $e}, + $line[$b + $e], $bl )); }