-
Notifications
You must be signed in to change notification settings - Fork 998
Closed
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
Defining a constant in wp-config.php
that includes __FILE__
in the name of the constant, causes wp-cli to fail with this error message:
Parse error: syntax error, unexpected 'var' (T_VAR) in phar:///usr/local/bin/wp/vendor/wp-cli/wp-cli/php/WP_CLI/Runner.php(1197) : eval()'d code on line 66
Using latest v2.4.0 phar executable.
Describe how other contributors can replicate this bug
- Add this line to
wp-config.php
define( 'WP_CONFIG__FILE__', __FILE__ );
- Run
wp
- See the above error, command fails
Describe what you expect as the correct outcome
I would expect the wp command list to display.
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.9
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