Make WordPress Core

Ticket #28155: 28155.5.diff

File 28155.5.diff, 627 bytes (added by soulseekah, 9 years ago)
  • src/wp-includes/wp-db.php

     
    13251325                if ( $this->use_mysqli && $this->result instanceof mysqli_result ) {
    13261326                        mysqli_free_result( $this->result );
    13271327                        $this->result = null;
    1328 
     1328                        // Sanity check before using the handle
     1329                        if ( empty( $this->dbh ) || !( $this->dbh instanceof mysqli ) ) {
     1330                                return;
     1331                        }
    13291332                        // Clear out any results from a multi-query
    13301333                        while ( mysqli_more_results( $this->dbh ) ) {
    13311334                                mysqli_next_result( $this->dbh );