-
-
Notifications
You must be signed in to change notification settings - Fork 2.3k
Open
Labels
Description
Deprecated: mb_strtolower(): Passing null to parameter #1 ($string) of type string is deprecated in vendor/yiisoft/yii/framework/web/CArrayDataProvider.php on line 179
protected function getSortingFieldValue($data, $fields)
{
if(is_object($data))
{
foreach($fields as $field)
$data=isset($data->$field) ? $data->$field : null;
}
else
{
foreach($fields as $field)
$data=isset($data[$field]) ? $data[$field] : null;
}
return $this->caseSensitiveSort ? $data : mb_strtolower($data,Yii::app()->charset);
}
What steps will reproduce the problem?
If your dataprovider have a field with null value and caseSensitiveSort = false you will have a notice due to the casting $data to string
What is the expected result?
No deprecation notice
What do you get instead?
deprecation notice
Additional info
Q | A |
---|---|
Yii version | 1.1.29 |
PHP version | 8.1 |
Operating system |