{{ message }}
Respect WP_DEBUG/WP_DEBUG_DISPLAY instead of unconditionally overriding display_errors#6284
Draft
Copilot wants to merge 9 commits into
Draft
Respect WP_DEBUG/WP_DEBUG_DISPLAY instead of unconditionally overriding display_errors#6284Copilot wants to merge 9 commits into
Copilot wants to merge 9 commits into
Conversation
…lways overriding display_errors Co-authored-by: swissspidy <841956+swissspidy@users.noreply.github.com>
Copilot
AI
changed the title
[WIP] Respect WP_DEBUG instead of overriding display_errors
Respect WP_DEBUG/WP_DEBUG_DISPLAY instead of unconditionally overriding display_errors
Mar 20, 2026
This comment was marked as resolved.
This comment was marked as resolved.
… When I try for STDERR-producing scenarios Co-authored-by: swissspidy <841956+swissspidy@users.noreply.github.com> Agent-Logs-Url: https://github.com/wp-cli/wp-cli/sessions/64331e74-d930-4d27-a6ae-032b5420050a
This comment was marked as resolved.
This comment was marked as resolved.
swissspidy
reviewed
Mar 20, 2026
This comment was marked as resolved.
This comment was marked as resolved.
…rors should be hidden Co-authored-by: swissspidy <841956+swissspidy@users.noreply.github.com> Agent-Logs-Url: https://github.com/wp-cli/wp-cli/sessions/fbca0519-fe3c-4131-ba97-5e3c7b737e22
This comment was marked as resolved.
This comment was marked as resolved.
This comment was marked as resolved.
This comment was marked as resolved.
…for WP_DEBUG_DISPLAY=false Agent-Logs-Url: https://github.com/wp-cli/wp-cli/sessions/d3e4efd4-ee08-44f7-91f5-d28b556cd958 Co-authored-by: swissspidy <841956+swissspidy@users.noreply.github.com>
This comment was marked as resolved.
This comment was marked as resolved.
Member
|
@copilot fix failing tests |
- flags.feature: Update "Debug run" scenario (@less-than-php-8) to expect empty STDERR (no PHP notice) when WP_DEBUG=false and --debug is not passed. The old test expected the undefined-constant notice unconditionally, but with the new behavior it is correctly suppressed. The second block (with --debug) is unchanged and still verifies the notice appears on STDERR. - wp-config.feature: Replace `STDERR should contain: TEST_CONFIG_OVERRIDE` (which relied on a PHP notice only produced on PHP < 8) with `STDOUT should not contain: TEST_CONFIG_OVERRIDE => success`, which correctly validates the negative case on both PHP 7.x and PHP 8+. Co-authored-by: swissspidy <841956+swissspidy@users.noreply.github.com>
Contributor
Author
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.

wp_debug_mode()inphp/utils-wp.phpto respectWP_DEBUG/WP_DEBUG_DISPLAYinstead of always overridingdisplay_errorstostderrRunner.php: make the post-WordPress-load error reporting conditional in Behat test environment, and explicitly suppress bothdisplay_errorsandlog_errorsafter WP loads when errors should be hiddenWhen I tryinstead ofWhen I runfor scenarios that produce STDERR output (WP_DEBUG=true and --debug scenarios)Original prompt
📍 Connect Copilot coding agent with Jira, Azure Boards or Linear to delegate work to Copilot in one click without leaving your project management tool.