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

Admin Context: Fix PHP fatals when admin.php has CRLF line endings #5875

Merged
merged 1 commit into from Nov 16, 2023

Conversation

xknown
Copy link
Contributor

@xknown xknown commented Nov 16, 2023

If wp-admin/admin.php has CRLF line endings, running wp --context=admin with any command results in a PHP fatal error because the regular expression to strip the wp-load.php require statement

Fixes #5844 Props @willrowe for the regex fix.

If `wp-admin/admin.php` has CRLF line endings, running `wp
--context=admin` with any command results in a PHP fatal error because
the regular expression to strip the wp-load.php require statement

Fixes wp-cli#5844
Props @willrowe for the regex fix.
@xknown xknown requested a review from a team as a code owner November 16, 2023 14:05
@danielbachhuber danielbachhuber added this to the 2.10.0 milestone Nov 16, 2023
Copy link
Member

@danielbachhuber danielbachhuber left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks, @xknown !

@danielbachhuber danielbachhuber merged commit e5b8f05 into wp-cli:main Nov 16, 2023
65 checks passed
@xknown xknown deleted the fix/context-admin-php-fatal branch November 16, 2023 14:34
@xknown xknown restored the fix/context-admin-php-fatal branch November 16, 2023 21:31
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.

Admin context crashes because of admin.php file formatting
2 participants