#5473 closed defect (bug) (fixed)
Suppress DB errors unless WP_DEBUG is true
| Reported by: |
|
Owned by: |
|
|---|---|---|---|
| Priority: | normal | Milestone: | 2.3.2 |
| Component: | General | Version: | 2.3.1 |
| Severity: | normal | Keywords: | show_errors wpdb db mysql has-patch |
| Cc: | filosofo |
Description
WordPress should assume that it's a production environment and not show DB errors.
Attachments (2)
Change History (12)
comment:1
follow-up:
↓ 3
Viper007Bond — 5 years ago
comment:2
Viper007Bond — 5 years ago
- Keywords has-patch added
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.
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.
- Resolution set to fixed
- Status changed from new to closed
- Milestone changed from 2.4 to 2.3.2
- Version changed from 2.4 to 2.3.1
comment:10
ryan — 5 years ago
Note: See
TracTickets for help on using
tickets.

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.