Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

PHP Deprecated Warning - trim(): Passing null to parameter #1 ($string) of type string is deprecated #374

Open
Alexchep opened this issue Oct 31, 2023 · 0 comments

Comments

@Alexchep
Copy link

I've installed PHP 8.2 and got Deprecated warning in kartik-v/yii2-export/src/ExportMenu.php on line #1303 (version 1.4.3 - latest)

image

I think we need to check $col->header before trim() and define empty string at least maybe if it's NULL. Here:

if ($col->header !== null || ($col->label === null && $col->attribute === null)) { return trim($col->header) !== '' ? $col->header : $col->grid->emptyCell; }

I know it's warning, not error. But it would nice if you can fix it with time. Thanks!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants