Skip to content

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

Merged
danielbachhuber merged 1 commit intowp-cli:mainfrom
xknown:fix/context-admin-php-fatal
Nov 16, 2023
Merged

Admin Context: Fix PHP fatals when admin.php has CRLF line endings#5875
danielbachhuber merged 1 commit intowp-cli:mainfrom
xknown:fix/context-admin-php-fatal

Conversation

@xknown
Copy link
Copy Markdown
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
Copy Markdown
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
@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

2 participants