Skip to content

No error reporting if XDebug is not installed#786

Merged
scribu merged 1 commit intomasterfrom
fix-786
Sep 23, 2013
Merged

No error reporting if XDebug is not installed#786
scribu merged 1 commit intomasterfrom
fix-786

Conversation

@scribu
Copy link
Copy Markdown
Member

@scribu scribu commented Sep 23, 2013

The following table describes where errors are sent in various situations:

XDebug enabled XDebug disabled
display_errors => true STDOUT, STDERR STDOUT
display_errors => false STDERR -

WP-CLI currently always sets display_errors => false, so users that don't have XDebug installed will see no errors.

@scribu
Copy link
Copy Markdown
Member Author

scribu commented Sep 23, 2013

The obvious solution: ini_set( 'display_errors', ! function_exists( 'xdebug_debug_zval' ) );

@scribu
Copy link
Copy Markdown
Member Author

scribu commented Sep 23, 2013

It turns out that you can also do ini_set( 'display_errors', 'STDERR' );.

scribu pushed a commit that referenced this pull request Sep 23, 2013
No error reporting if XDebug is not enabled
@scribu scribu merged commit bbaa139 into master Sep 23, 2013
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant