Admin Context: Fix PHP fatals when admin.php has CRLF line endings by xknown · Pull Request #5875 · wp-cli/wp-cli

@xknown

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.

danielbachhuber

@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