Make WordPress Core

Changeset 36997


Ignore:
Timestamp:
03/15/2016 03:27:14 AM (9 years ago)
Author:
pento
Message:

WPDB: Reset connection status variables when the connection is closed.

Fixes #36240.

Location:
trunk
Files:
2 edited

Legend:

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

    r36840 r36997  
    31173117        if ( $closed ) {
    31183118            $this->dbh = null;
     3119            $this->ready = false;
     3120            $this->has_connected = false;
    31193121        }
    31203122
  • trunk/tests/phpunit/tests/db.php

    r36478 r36997  
    947947        $this->assertFalse( $wpdb->close() );
    948948
     949        $this->assertFalse( $wpdb->ready );
     950        $this->assertFalse( $wpdb->has_connected );
     951
    949952        $wpdb->check_connection();
    950953
Note: See TracChangeset for help on using the changeset viewer.