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

SqlBase: Fix PHP 8.1 compatibility with drush sql:create --simulate #5757

Merged
merged 1 commit into from
Sep 14, 2023

Conversation

codebymikey
Copy link
Contributor

An exception is thrown because the return type doesn't match a boolean value or null.

This issue also affects Drush 11 and will probably need backporting, but the following exception is thrown when running drush sql:create --simulate:

TypeError: Drush\Sql\SqlBase::query(): Return value must be of type ?bool, none returned in /app/application/vendor/drush/drush/src/Sql/SqlBase.php on line 305 
#0 /app/application/vendor/drush/drush/src/Sql/SqlBase.php(457): Drush\Sql\SqlBase->query('DROP DATABASE I...')
#1 /app/application/vendor/drush/drush/src/Commands/sql/SqlCommands.php(99): Drush\Sql\SqlBase->createdb(true)
#2 [internal function]: Drush\Commands\sql\SqlCommands->create(Array)

An exception is thrown because the return type doesn't match a boolean value or null.
@weitzman weitzman merged commit fe2e71b into drush-ops:12.x Sep 14, 2023
@codebymikey codebymikey deleted the patch-1 branch October 25, 2024 08:55
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.

2 participants