-
Notifications
You must be signed in to change notification settings - Fork 38
Closed
wp-cli/wp-config-transformer
#53Labels
Description
Bug Report
- Yes, I reviewed the contribution guidelines.
- Yes, more specifically, I reviewed the guidelines on how to write clear bug reports.
Describe the current, buggy behavior
Deleting a constant with concatenated function from wp-config.php with wp config delete deletes more than just that constant.
Describe how other contributors can replicate this bug
- A wp-config.php file with a constant definition concatenating a function, like in my example
- Run
wp config delete USER_PATH
<?php
define( 'WP_DEBUG', false );
define( 'USER_PATH', '/var/www/' . get_current_user() );
define( 'THIS_AND', md5( 'that' ) );
if ( isset( $_SERVER['HTTP_X_FORWARDED_PROTO'] ) && 'https' === $_SERVER['HTTP_X_FORWARDED_PROTO'] ) {
$_SERVER['HTTPS'] = 'on';
}
define( 'DISABLE_WP_CRON', true );
/* That's all, stop editing! Happy publishing. */Describe what you would expect as the correct outcome
wp-config.php with just USER_PATH constant definition removed.
Let us know what environment you are running this on
OS: Linux 4.9.184-linuxkit #1 SMP Tue Jul 2 22:58:16 UTC 2019 x86_64
Shell:
PHP binary: /usr/local/bin/php
PHP version: 7.3.11
php.ini used: /usr/local/etc/php/php.ini
WP-CLI root dir: phar://wp-cli.phar/vendor/wp-cli/wp-cli
WP-CLI vendor dir: phar://wp-cli.phar/vendor
WP_CLI phar path: /var/www/html
WP-CLI packages dir:
WP-CLI global config:
WP-CLI project config:
WP-CLI version: 2.4.0
Reactions are currently unavailable