Skip to content

Prevent WP_DEBUG already defined when provided via --extra-php#144

Merged
schlessera merged 2 commits intowp-cli:mainfrom
borkweb:fix/140-config-create-debug-defined
Sep 11, 2022
Merged

Prevent WP_DEBUG already defined when provided via --extra-php#144
schlessera merged 2 commits intowp-cli:mainfrom
borkweb:fix/140-config-create-debug-defined

Conversation

@borkweb
Copy link
Contributor

@borkweb borkweb commented Sep 11, 2022

This fixes #140 by moving the WP_DEBUG define after the output from {extra_php} and wrapping it in a conditional. This avoids the Notice: Constant WP_DEBUG already defined that gets thrown when define( 'WP_DEBUG', ... ); is provided via --extra-php.

This fixes wp-cli#140 by moving the `WP_DEBUG` define after the output from `{extra_php}` and wrapping it in a conditional. This avoids the `Notice: Constant WP_DEBUG already defined` that gets thrown when `define( 'WP_DEBUG', ... );` is provided via `--extra-php`.
@borkweb borkweb requested a review from a team as a code owner September 11, 2022 21:06
@schlessera schlessera added bug command:config-create Related to 'config create' command labels Sep 11, 2022
@schlessera schlessera added this to the 2.1.4 milestone Sep 11, 2022
Co-authored-by: Alain Schlesser <[email protected]>
@schlessera schlessera merged commit b665cb2 into wp-cli:main Sep 11, 2022
@borkweb borkweb deleted the fix/140-config-create-debug-defined branch September 11, 2022 21:39
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

bug command:config-create Related to 'config create' command

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Unable to properly set WP_DEBUG using wp config create --extra-php as of wp cli 2.6.0

2 participants