[wp-trac] [WordPress Trac] #26102: $wpdb error suppression should always inherit previous value when being toggled
WordPress Trac
noreply at wordpress.org
Mon Nov 18 19:41:38 UTC 2013
#26102: $wpdb error suppression should always inherit previous value when being
toggled
----------------------------+-----------------------
Reporter: wonderboymusic | Owner:
Type: defect (bug) | Status: new
Priority: normal | Milestone: 3.8
Component: Database | Version: 2.5
Severity: normal | Keywords: has-patch
----------------------------+-----------------------
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.
--
Ticket URL: <http://core.trac.wordpress.org/ticket/26102>
WordPress Trac <http://core.trac.wordpress.org/>
WordPress blogging software
More information about the wp-trac
mailing list