Make WordPress Core

Changeset 27277


Ignore:
Timestamp:
02/26/2014 04:14:54 AM (11 years ago)
Author:
nacin
Message:

wpdb: set dbh to null when the mysqli connection fails. see #21663.

File:
1 edited

Legend:

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

    r27257 r27277  
    13281328                @mysqli_real_connect( $this->dbh, $host, $this->dbuser, $this->dbpassword, null, $port, $socket, $client_flags );
    13291329            }
     1330
     1331            if ( $this->dbh->connect_errno ) {
     1332                $this->dbh = null;
     1333            }
    13301334        } else {
    13311335            if ( WP_DEBUG ) {
Note: See TracChangeset for help on using the changeset viewer.