diff --git a/wp-includes/version.php b/wp-includes/version.php index 1a834af003..1980a5f570 100644 --- a/wp-includes/version.php +++ b/wp-includes/version.php @@ -4,7 +4,7 @@ * * @global string $wp_version */ -$wp_version = '4.9-beta1-41819'; +$wp_version = '4.9-beta1-41820'; /** * 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 9759438a0c..a5903b4187 100644 --- a/wp-includes/wp-db.php +++ b/wp-includes/wp-db.php @@ -1479,7 +1479,7 @@ class wpdb { $port = null; $socket = null; $is_ipv6 = false; - + if ( $host_data = $this->parse_db_host( $this->dbhost ) ) { list( $host, $port, $socket, $is_ipv6 ) = $host_data; } @@ -1621,9 +1621,10 @@ class wpdb { return false; } + $host = ''; foreach ( array( 'host', 'port', 'socket' ) as $component ) { - if ( array_key_exists( $component, $matches ) ) { - $$component = $matches[$component]; + if ( ! empty( $matches[ $component ] ) ) { + $$component = $matches[ $component ]; } }