You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
- [x] a bug report
- [ ] a feature request
- [ ] **not** a usage question (ask them on https://stackoverflow.com/questions/tagged/phpspreadsheet or https://gitter.im/PHPOffice/PhpSpreadsheet)
What is the expected behavior?
We should be able to set the delimiter to null so that the delimiter is inferred from the file.
Laravel-excel package sets the delimiter to a comma by default (for performance issues I guess) and it's not possible to set it back to null afterwards. See also laravel-excel #3346
What is the current behavior?
It throws TypeError since the signature of \PhpOffice\PhpSpreadsheet\Reader\Csv::setDelimiter does not allow null values.
Which versions of PhpSpreadsheet and PHP are affected?
v1.17.* is fine, got the error with v1.18 and php8.
The text was updated successfully, but these errors were encountered:
See issue PHPOffice#2287. A 1-character change. The delimiter variable is defined as nullable, and getDelimiter can return null; setDelimiter should follow suit.
* Permit CSV Delimiter to be Set to Null
See issue #2287. A 1-character change. The delimiter variable is defined as nullable, and getDelimiter can return null; setDelimiter should follow suit.
* Scrutinizer Inanity
Are you sure the test always returns null?????
Yes, I'm sure, that's why it's part of the test.
Let's see if we can recode it and miss this "problem".
This is:
What is the expected behavior?
We should be able to set the delimiter to
null
so that the delimiter is inferred from the file.Laravel-excel package sets the delimiter to a comma by default (for performance issues I guess) and it's not possible to set it back to
null
afterwards. See also laravel-excel #3346What is the current behavior?
It throws
TypeError
since the signature of\PhpOffice\PhpSpreadsheet\Reader\Csv::setDelimiter
does not allow null values.Which versions of PhpSpreadsheet and PHP are affected?
v1.17.*
is fine, got the error withv1.18
and php8.The text was updated successfully, but these errors were encountered: