constant wp_debug already defined
AaronHolbrook opened this issue · 2 comments
AaronHolbrook commented
wp cli version 0.23.1
This happens when I have WP_DEBUG
defined in the site's wp-config. If I comment it out there, then no notice is reported.
vagrant@vvv:/srv/www/test-site$ wp hook wp_enqueue_scripts
PHP Notice: Constant WP_DEBUG already defined in phar:///usr/local/bin/wp/php/WP_CLI/Runner.php(792) : eval()'d code on line 84
PHP Stack trace:
PHP 1. {main}() /usr/local/bin/wp:0
PHP 2. include() /usr/local/bin/wp:4
PHP 3. include() phar:///usr/local/bin/wp/php/boot-phar.php:5
PHP 4. WP_CLI\Runner->start() phar:///usr/local/bin/wp/php/wp-cli.php:21
PHP 5. WP_CLI\Runner->load_wordpress() phar:///usr/local/bin/wp/php/WP_CLI/Runner.php:755
PHP 6. eval() phar:///usr/local/bin/wp/php/WP_CLI/Runner.php:792
PHP 7. define('WP_DEBUG', FALSE) phar:///usr/local/bin/wp/php/WP_CLI/Runner.php(792) : eval()'d code:84
Error: Invalid value specified for positional arg.
danielbachhuber commented
Hm. This command doesn't touch WP_DEBUG
at all.
Are you running any other community packages? Can you share the contents of wp-config.php
minus any secrets?
AaronHolbrook commented
Oh my, this is embarrassing, it's surfacing because in the wp-config.php
it's defined twice.
🤦
Apologies