• Resolved Norm Sash

    (@normsash)


    Hi,

    I’m having trouble with the display of error messages when the plugin is active. No matter what I do, if the plugin is active, php errors display on-screen.

    I’ve noticed this behavior:
    Set WP_DEBUG_DISPLAY to false, default is true. –> checked
    entry is in wp-config define( ‘WP_DEBUG_DISPLAY’, FALSE ); but php errors still show on-screen.

    Set WP_DEBUG_DISPLAY to false, default is true. –> unchecked
    entry deleted in wp-config for WP_DEBUG_DISPLAY is deleted (completely removed from wp-config, not just set to FALSE. Still, php errors displayed on-screen. I did some tests, and at least on my site, if WP_DEBUG_DISPLAY is missing from wp-config then php errors will be displayed.

    If I disable WP Debugging and manually control WP_DEBUG_DISPLAY in wp-config, then I can control the php error displays as expected.

    Thanks,
    -Norm

Viewing 5 replies - 1 through 5 (of 5 total)
  • Plugin Author Andy Fragen

    (@afragen)

    The default for WP_DISPLAY_ERROR is true, unless it’s defined elsewhere.

    WP Debugging should define that to false in wp-config.php when the checkbox is checked.

    Site Health should show you these settings in the Info tab.

    If WP_DEBUG is also true I think WordPress sets may set WP_DISPLAY_ERROR to true if it’s not defined elsewhere.

    Unfortunately the only time I’ve seen anything close to this is when another plugin like Query Monitor sets WP_DEBUG to true and the default behavior occurs.

    Is there some other plugin that might be defining one or more of these constants?

    Thread Starter Norm Sash

    (@normsash)

    Thanks Andy. I’m still iteratting trying to find out what might be setting WP_DISPLAY_ERROR, but I don’t have an answer yet.

    Out of curiosity… Is there a reason why define( ‘WP_DEBUG_DISPLAY’, TRUE ) is not written to wp-config like define( ‘WP_DEBUG_DISPLAY’, false) is (instead of it being deleted from the wp-config file)?

    Rather, I would prefer that if I explicitly uncheck “Set WP_DEBUG_DISPLAY to false” that it would retain & set define( ‘WP_DEBUG_DISPLAY’, TRUE ) so it is present in the wp-config file.

    Thread Starter Norm Sash

    (@normsash)

    Oh, hey, I just realized you mentioned WP_DISPLAY_ERROR, while I’m referencing WP_DEBUG_DISPLAY. Are we talking the same thing? I’m not familiar with WP_DISPLAY_ERROR.

    Plugin Author Andy Fragen

    (@afragen)

    I really did mean WP_DEBUG_DISPLAY, sorry for the confusion.

    Plugin Author Andy Fragen

    (@afragen)

    The reason that WP_DEBUG_DISPLAY is not written to the config file when it is true is that core will set this automatically when WP_DEBUG is true.

    So technically, there will be no need to set it to true in the config file.

Viewing 5 replies - 1 through 5 (of 5 total)
  • The topic ‘Can’t disable display of error messages’ is closed to new replies.