Opened 13 years ago
Closed 13 years ago
#26102 closed defect (bug) (fixed)
$wpdb error suppression should always inherit previous value when being toggled
| Reported by: | wonderboymusic | Owned by: | wonderboymusic |
|---|---|---|---|
| Priority: | normal | Milestone: | 3.8 |
| Component: | Database | Version: | 2.5 |
| Severity: | normal | Keywords: | has-patch |
| Cc: | Focuses: |
Description
There are some places in core that explicitly set $wpdb->suppress_errors to false via the $wpdb->suppress_errors() method. Other places handle this correctly:
$suppress = $wpdb->suppress_errors(); code_that_might_blow_up(); $wpdb->suppress_errors( $suppress );
Perfect example of why this matters: multisite unit tests will explode if database errors are output. Even if $wpdb->suppress_errors() is called in setUp or in individual tests, install_blog() is overriding this value by setting it to false after it itself suppresses the errors.
Attachments (1)
Change History (2)
Note:
See TracTickets
for help on using tickets.
![(please configure the [header_logo] section in trac.ini)](/chrome/site/your_project_logo.png)
In 26252: