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
strrpos(): Passing null to parameter #1 ($haystack) of type string is deprecated
What are the steps to reproduce?
On a sheet, call $sheet->removeAutoFilter()
This will internally call $this->autoFilter->setRange(null) where null will cause the error.
I temporarily fixed it with replacing it with an empty string, but i am not sure if this is a correct fix.
Most minimal example
$spreadsheet = new Spreadsheet();
$sheet = $spreadsheet->getSheet(0);
$sheet->removeAutoFilter();
Which versions of PhpSpreadsheet and PHP are affected?
Current Master as well as current stable release. The master have some significant changes to stable but this error is still not fixed.
The text was updated successfully, but these errors were encountered:
oleibman
added a commit
to oleibman/PhpSpreadsheet
that referenced
this issue
Dec 18, 2021
* Null Passed to AutoFilter SetRange
Fix#2281. Delete auto filter set range to null, but should set it to null string. This causes a deprecation warning in Php8.1.
* Constructor Call Also Sets Range to Null
Should set it to null string.
This is:
What is the expected behavior?
No error :)
What is the current behavior?
strrpos(): Passing null to parameter #1 ($haystack) of type string is deprecated
What are the steps to reproduce?
On a sheet, call
$sheet->removeAutoFilter()
This will internally call
$this->autoFilter->setRange(null)
wherenull
will cause the error.I temporarily fixed it with replacing it with an empty string, but i am not sure if this is a correct fix.
Most minimal example
Which versions of PhpSpreadsheet and PHP are affected?
Current Master as well as current stable release. The master have some significant changes to stable but this error is still not fixed.
The text was updated successfully, but these errors were encountered: