Make WordPress Core

Changeset 30299


Ignore:
Timestamp:
11/11/2014 02:16:19 AM (10 years ago)
Author:
pento
Message:

wpdb: When flushing results on a mysqli connection, make sure that wpdb::$dbh is a valid mysqli connection handle.

Fixes a unit test failure introduced in [30297].

Fixes #28155.

Props soulseekah.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/wp-includes/wp-db.php

    r30297 r30299  
    13271327            $this->result = null;
    13281328
     1329            // Sanity check before using the handle
     1330            if ( empty( $this->dbh ) || !( $this->dbh instanceof mysqli ) ) {
     1331                return;
     1332            }
     1333
    13291334            // Clear out any results from a multi-query
    13301335            while ( mysqli_more_results( $this->dbh ) ) {
Note: See TracChangeset for help on using the changeset viewer.