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

Ensure a string is passed to strtolower() in PmCommands::pmList() #5252

Merged
merged 2 commits into from
Sep 26, 2022

Conversation

claudiu-cristea
Copy link
Member

@claudiu-cristea claudiu-cristea commented Sep 26, 2022

Steps to reproduce

On PHP 8.1, run:

$ ./vendor/bin/drush pml

You'll get:

[error] Message: /Deprecated function/: strtolower(): Passing null to parameter #1 ($string) of type string is deprecated in /Drush\Drupal\Commands\pm\PmCommands->pmList()/ (line /239/ of /vendor/drush/drush/src/Drupal/Commands/pm/PmCommands.php/).
Drush\Drupal\Commands\pm\PmCommands->pmList(Array) call_user_func_array(Array, Array) (Line: 257)>
Consolidation\AnnotatedCommand\CommandProcessor->runCommandCallback(Array, Object) (Line: 212)
...

@weitzman
Copy link
Member

The (string) call should go inside of strtolower I think

@claudiu-cristea
Copy link
Member Author

The (string) call should go inside of strtolower I think

So true 😀

@weitzman
Copy link
Member

I dont understand it, but I think the test failure is trying to tell us something. Its in pm:list which would be quite the coincidence if its unrelated.

@claudiu-cristea
Copy link
Member Author

@weitzman It's failing in \Unish\WatchdogTailTest::testWatchdogTail() which doesn't seem to run pm:list

@weitzman weitzman merged commit fad15a6 into 11.x Sep 26, 2022
@weitzman weitzman deleted the pmList-php8.1 branch September 26, 2022 16:11
@weitzman
Copy link
Member

You are correct.

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

Successfully merging this pull request may close these issues.

None yet

2 participants