Make WordPress Core

Opened 16 years ago

Closed 16 years ago

Last modified 8 years ago

#5473 closed defect (bug) (fixed)

Suppress DB errors unless WP_DEBUG is true

Reported by: filosofo's profile filosofo Owned by:
Milestone: 2.3.2 Priority: normal
Severity: normal Version: 2.3.1
Component: General Keywords: show_errors wpdb db mysql has-patch
Focuses: Cc:

Description

WordPress should assume that it's a production environment and not show DB errors.

Attachments (2)

suppress_db_errors.diff (2.3 KB) - added by filosofo 16 years ago.
wpdb_errors.diff (4.5 KB) - added by ryan 16 years ago.

Download all attachments as: .zip

Change History (13)

#1 follow-up: @Viper007Bond
16 years ago

Not sure how I feel about this. Spitting out error messages told a lot of people their plugins didn't work with 2.3 and is a useful thing for site owners. With them hidden, it'd go missed by most and they wouldn't know why something wasn't working.

Perhaps an alternate solution is to show them to administrator users regardless (manage_options ?), and only to everyone if WP_DEBUG is on.

#2 @Viper007Bond
16 years ago

  • Keywords has-patch added

#3 in reply to: ↑ 1 @filosofo
16 years ago

Replying to Viper007Bond:

Perhaps an alternate solution is to show them to administrator users regardless (manage_options ?), and only to everyone if WP_DEBUG is on.

I think this might be a good idea, but it should probably be done at the WP_DEBUG level, if possible.

@ryan
16 years ago

#4 @ryan
16 years ago

When doing hide/show pair, this patch restores the show state to what it was prior to hiding. This way we don't have to check WP_DEBUG everywhere.

Patch also does an error_log() inside print_error() so that the error info is always available in the error log.

#6 @ryan
16 years ago

(In [6391]) Suppress display of DB error messages by default. Props filosofo. see #5473

#7 @ryan
16 years ago

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

(In [6443]) Suppress display of DB error messages by default. Props filosofo. fixes #5473 for 2.3

#8 @lloydbudd
16 years ago

  • Milestone changed from 2.4 to 2.3.2
  • Version changed from 2.4 to 2.3.1

#9 @ryan
16 years ago

(In [6469]) Show DB errors if WP_DEBUG and if installing. see #5473

#10 @ryan
16 years ago

(In [6470]) Show DB errors if WP_DEBUG and if installing. see #5473

Note: See TracTickets for help on using tickets.