Filter empty database parameters to prevent MySQL command failures#308
Merged
Conversation
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Fix Plan: mysqlcheck empty character set error
run()function to identify where empty values are addedrun()function to skip empty string and null values$final_argsafter merge to catch empty CLI argsSummary
Successfully fixed the issue where database commands fail when DB constants are empty strings. The fix:
$final_argsafter merging to catch empty values from both wp-config and CLI argsDB_CHARSEThandling (matching the original bug report) and verifies successful executionOriginal prompt
This section details on the original issue you should resolve
<issue_title>mysqlcheck: Character set '' is not a compiled character set</issue_title>
<issue_description>## Bug Report
When running commands related to
dbat hostinger, I get the following error.Hostinger support said it's a bug with the wp-cli, and my debug shows the same..
Describe the current, buggy behavior
When running
wp db checkin any of my wp installs at hostinger, I get the following:With debug...
✨ Let Copilot coding agent set things up for you — coding agent works faster and does higher quality work when set up for your repo.