[wp-trac] [WordPress Trac] #23085: Calling $wpdb->query() when no connection exists causes mysql_error() to throw an error

WordPress Trac noreply at wordpress.org
Tue May 24 05:23:09 UTC 2016


#23085: Calling $wpdb->query() when no connection exists causes mysql_error() to
throw an error
--------------------------+---------------------
 Reporter:  mbijon        |       Owner:  pento
     Type:  defect (bug)  |      Status:  closed
 Priority:  normal        |   Milestone:  4.6
Component:  Database      |     Version:  3.5
 Severity:  normal        |  Resolution:  fixed
 Keywords:                |     Focuses:
--------------------------+---------------------
Changes (by pento):

 * status:  assigned => closed
 * resolution:   => fixed


Comment:

 In [changeset:"37548"]:
 {{{
 #!CommitTicketReference repository="" revision="37548"
 Database: Don't generate unnecessary warnings in `wpdb::query()`.

 In the event that the database has gone away for some reason, calls to
 `mysqli_errno()` and `mysqli_error()` (and their `ext/mysql` equivalents,
 of course), will generate PHP warnings, which are unsightly, and not how
 we do things in these parts.

 Props mbijon, craig-ralston for the original patch.

 Fixes #23085.
 }}}

--
Ticket URL: <https://core.trac.wordpress.org/ticket/23085#comment:9>
WordPress Trac <https://core.trac.wordpress.org/>
WordPress publishing platform


More information about the wp-trac mailing list