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 8.1 deprecated warning #5066

Closed
Sweetchuck opened this issue Feb 9, 2022 · 0 comments
Closed

PHP 8.1 deprecated warning #5066

Sweetchuck opened this issue Feb 9, 2022 · 0 comments

Comments

@Sweetchuck
Copy link
Contributor

Sweetchuck commented Feb 9, 2022

To Reproduce
PHP 8.1
drush/drush 11.0.5
Custom test which uses the \Drush\TestTraits\DrushTestTrait::drush()
The optional $suffix = null argument causes the problem.
$cmd[] = $suffix;
$exec = array_filter($cmd, 'strlen');

Expected behavior
No warnings and errors.

Actual behavior
Deprecated: strlen(): Passing null to parameter 1 ($string) of type string is deprecated in /project/vendor/drush/drush/src/TestTraits/DrushTestTrait.php on line 79

Workaround
Probably a lazy error_reporting value in php.ini, but I haven't tried it.

System Configuration

Q A
Drush version? 11.0.5
Drupal version? 9.3.5
PHP version 8.1.2
OS? Linux
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant