Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Appearance settings

Detect and ignore BOMs#5597

Merged
schlessera merged 3 commits into
masterwp-cli/wp-cli:masterfrom
fix/5578-detect-and-strip-bom-in-wp-config.phpwp-cli/wp-cli:fix/5578-detect-and-strip-bom-in-wp-config.phpCopy head branch name to clipboard
Jan 6, 2022
Merged

Detect and ignore BOMs#5597
schlessera merged 3 commits into
masterwp-cli/wp-cli:masterfrom
fix/5578-detect-and-strip-bom-in-wp-config.phpwp-cli/wp-cli:fix/5578-detect-and-strip-bom-in-wp-config.phpCopy head branch name to clipboard

Conversation

@schlessera

Copy link
Copy Markdown
Member

This PR adds byte-order marks (BOM) detection to the logic that parses the wp-config.php file for loading WP within the WP-CLI context.

If a BOM is detected, WP-CLI issues a warning and then strips that BOM for further parsing.

_ 2022-01-05 at 11 52 24 AM li-dev_wp-cli

Fixes #5577
Fixes #5578

@schlessera schlessera added this to the 2.5.1 milestone Jan 5, 2022
@schlessera schlessera requested a review from a team as a code owner January 5, 2022 17:58
@schlessera schlessera force-pushed the fix/5578-detect-and-strip-bom-in-wp-config.php branch from cbe60f3 to 7357ff9 Compare January 5, 2022 20:00
@schlessera schlessera force-pushed the fix/5578-detect-and-strip-bom-in-wp-config.php branch from 7357ff9 to 44eb815 Compare January 6, 2022 16:04
@schlessera schlessera merged commit ef28288 into master Jan 6, 2022
@schlessera schlessera deleted the fix/5578-detect-and-strip-bom-in-wp-config.php branch January 6, 2022 23:22
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Detect and warn about BOM in wp-config.php Can't run WP-CLI: PHP Parse error: syntax error, unexpected '?'

2 participants

Morty Proxy This is a proxified and sanitized view of the page, visit original site.