diff --git a/wp-includes/version.php b/wp-includes/version.php index cb26be8263..7fa19cb21e 100644 --- a/wp-includes/version.php +++ b/wp-includes/version.php @@ -4,7 +4,7 @@ * * @global string $wp_version */ -$wp_version = '4.1-alpha-30298'; +$wp_version = '4.1-alpha-30299'; /** * Holds the WordPress DB revision, increments when changes are made to the WordPress DB schema. diff --git a/wp-includes/wp-db.php b/wp-includes/wp-db.php index f01ba97a8c..8e4d2a42e5 100644 --- a/wp-includes/wp-db.php +++ b/wp-includes/wp-db.php @@ -1326,6 +1326,11 @@ class wpdb { mysqli_free_result( $this->result ); $this->result = null; + // Sanity check before using the handle + if ( empty( $this->dbh ) || !( $this->dbh instanceof mysqli ) ) { + return; + } + // Clear out any results from a multi-query while ( mysqli_more_results( $this->dbh ) ) { mysqli_next_result( $this->dbh );