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

deleting a constant with concatenated function deletes much more #101

todeveni opened this issue Nov 13, 2019 · 0 comments


Copy link

@todeveni todeveni commented Nov 13, 2019

Bug Report

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

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
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
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
1 participant
You can’t perform that action at this time.