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
question: when i load xlsx,a little error occurred
File : E:\htdocs\vendor\phpoffice\phpspreadsheet\src\PhpSpreadsheet\Shared\StringHelper.php
Error : Argument 1 passed to PhpOffice\PhpSpreadsheet\Shared\StringHelper::strToLower() must be of the type string, null given,
Call : called in E:\htdocs\vendor\phpoffice\phpspreadsheet\src\PhpSpreadsheet\Calculation\LookupRef\VLookup.php on line 71
original code public static function strToLower(string $textValue): string { return mb_convert_case($textValue, MB_CASE_LOWER, 'UTF-8'); }
suggest improvements, support null, php >=7.1 public static function strToLower(?string $textValue): string { return mb_convert_case($textValue, MB_CASE_LOWER, 'UTF-8'); }
thank you !
The text was updated successfully, but these errors were encountered:
Depending on the version of PhpSPreadsheet that you're running, this is fixed in VLookup.php where the value passed to StringHelper::strToLower() is explicitly cast to a string:
question: when i load xlsx,a little error occurred
File : E:\htdocs\vendor\phpoffice\phpspreadsheet\src\PhpSpreadsheet\Shared\StringHelper.php
Error : Argument 1 passed to PhpOffice\PhpSpreadsheet\Shared\StringHelper::strToLower() must be of the type string, null given,
Call : called in E:\htdocs\vendor\phpoffice\phpspreadsheet\src\PhpSpreadsheet\Calculation\LookupRef\VLookup.php on line 71
original code
public static function strToLower(string $textValue): string { return mb_convert_case($textValue, MB_CASE_LOWER, 'UTF-8'); }
suggest improvements, support null, php >=7.1
public static function strToLower(?string $textValue): string { return mb_convert_case($textValue, MB_CASE_LOWER, 'UTF-8'); }
thank you !
The text was updated successfully, but these errors were encountered: