[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 20:44:34 UTC 2013


#26102: $wpdb error suppression should always inherit previous value when being
toggled
----------------------------+-----------------------------
 Reporter:  wonderboymusic  |       Owner:  wonderboymusic
     Type:  defect (bug)    |      Status:  closed
 Priority:  normal          |   Milestone:  3.8
Component:  Database        |     Version:  2.5
 Severity:  normal          |  Resolution:  fixed
 Keywords:  has-patch       |
----------------------------+-----------------------------
Changes (by wonderboymusic):

 * owner:   => wonderboymusic
 * status:  new => closed
 * resolution:   => fixed


Comment:

 In [changeset:"26252"]:
 {{{
 #!CommitTicketReference repository="" revision="26252"
 For unit tests that call `wpmu_create_blog()`, Blog factory, or
 installation code that attempts to clear transients: suppress database
 errors on `setUp` and restore on `tearDown`.

 There are a few places in core that were preventing this from working by
 explicity setting `$wpdb->suppress_errors` to `false`. Instead, they
 should inherit the value that existed before errors were suppressed.

 This allows Multisite unit tests to run without explosive database errors,
 and allows `$wpdb->suppress_errors` to be overridden all the way down the
 chain.

 Fixes #26102.
 }}}

--
Ticket URL: <http://core.trac.wordpress.org/ticket/26102#comment:1>
WordPress Trac <http://core.trac.wordpress.org/>
WordPress blogging software


More information about the wp-trac mailing list