WP-Config - invalid values for WP_DEBUG defines

Q: Date/Time this occurred (Provide your time zone also)
**A: 19 Jan 2021 11am

Q: DevKinsta Version
**A: 1.0.1

Q: OS Version
**A: Mac OS X 10.15.7 (Catalina)

Q: Docker Desktop Version
**A: 3.1.0

Q: Were any error codes or messages observed? If so, what were they?
**A: None

Q: Detailed Description of the Problem
**A: Value of WP_DEBUG_DISPLAY ignored.
The values entered by default are strings (i.e. quoted) not Boolean -
these are the correct values:
define( ‘WP_DEBUG’, true );
define( ‘WP_DEBUG_LOG’, true );
define( ‘WP_DEBUG_DISPLAY’, false );

Good catch! Thanks for reporting.

Q: Date/Time this occurred (Provide your time zone also)
A: Feb 9 2021 - 7:36PM MST

Q: DevKinsta Version
A: Latest

Q: OS Version
A: Windows 10

Q: Docker Desktop Version
A:

Q: Were any error codes or messages observed? If so, what were they?
A: Debugging is showing even though WP_DEBUG is off.

Q: Detailed Description of the Problem
A: On one of my pages debugging messages are still appearing despite WP_DEBUG being false.


image

Hi @aidenberzins . Would you happen to have WP_DEBUG inserted anywhere else? Perhaps in your themes function.php file?

No, it is not defined elsewhere. I did an entire file search.

It appears when you toggle the switch the
wp-config.php is either all true or all false.

But when the settings are as follows the errors no longer display on the front end.

define('WP_DEBUG', true);
define('WP_DEBUG_LOG', true);
define('WP_DEBUG_DISPLAY', false);
1 Like

So when you toggle between it appears to change the value to strings rather than booleans. So this does seem to be a bug.

1 Like

Thanks for reporting this! It does appear to be a bug. I’ll let you know when this is solved :slight_smile:

I had same issue as @aidenberzins . I turned the debug switch off, however, debug messages were still showing. To fix: in wp-includes/load.php on line 450: change ini_set( ‘display_errors’, 1 ); TO ini_set( ‘display_errors’, 0 ); in order to remove the debug messages. Screenshot 2021-03-22 001744

NOTE - The issue has to do with invalid values in the define for WP_DEBUG - the quoted string 'true" or ‘false’ evaluates as true - you need to remove the quotes for the values to be corrected evlauated.

For those experiencing this issue, be sure to replace your wp-config.php values with the following:

define('WP_DEBUG', true);
define('WP_DEBUG_LOG', true);
define('WP_DEBUG_DISPLAY', false);