Make WordPress Core

Opened 12 years ago

Closed 12 years ago

#11837 closed defect (bug) (fixed)

define('WP_DEBUG', false) generates a silent E_NOTICE

Reported by: nacin Owned by: westi
Milestone: 3.0 Priority: low
Severity: minor Version: 2.9
Component: Warnings/Notices Keywords: has-patch commit
Focuses: Cc:


In wp-settings.php, we're checking if WP_DEBUG is defined and is true. If its not, then we're defining WP_DEBUG as false.

Of course, if WP_DEBUG is defined as false already, then we're generating a silent E_NOTICE (suppressed by the error_reporting initially set in wp-load.php).

Code should check if WP_DEBUG is defined before defining to false.

Attachments (2)

11837.diff (495 bytes) - added by nacin 12 years ago.
11837.2.diff (787 bytes) - added by nacin 12 years ago.
Realized this would be a better way to do it

Download all attachments as: .zip

Change History (4)

12 years ago

12 years ago

Realized this would be a better way to do it

#1 @hakre
12 years ago

Just reviewed the ticket & two patches. +1 for the second approach, think it's worth to fix and ok for commit.

#2 @westi
12 years ago

  • Resolution set to fixed
  • Status changed from new to closed

(In [12685]) Tidy up logic for defining WP_DEBUG so we only define it if it isn't already. Fixes #11837 props nacin.

Note: See TracTickets for help on using tickets.