CsvReader::current() does not check for end of line.
So if we have the end of the file $line = $this->file->current(); returns us false.
Then php die when try to count for false if (count($this->columnHeaders) === count($line)) {
It as well can happen here:
if (empty($this->columnHeaders)) {
return $this->file->current();
}
So that means
public function current(): ?array has a wrong return type (according to code, it has to be false|null|array)
I am currently use composer patch which is adding a simple check.
do {
$line = $this->file->current();
+ if ($line === false) {
+ return false;
+ }
+
// In non-strict mode pad/slice the line to match the column headers
if (!$this->isStrict()) {
if ($this->headersCount > count($line)) {
CsvReader::current() does not check for end of line.
So if we have the end of the file
$line = $this->file->current();returns us false.Then php die when try to count for false
if (count($this->columnHeaders) === count($line)) {It as well can happen here:
So that means
public function current(): ?arrayhas a wrong return type (according to code, it has to befalse|null|array)I am currently use composer patch which is adding a simple check.