diff --git a/wp-includes/version.php b/wp-includes/version.php index 9ee46e5db0..52a4cb647d 100644 --- a/wp-includes/version.php +++ b/wp-includes/version.php @@ -16,7 +16,7 @@ * * @global string $wp_version */ -$wp_version = '6.1-alpha-53670'; +$wp_version = '6.1-alpha-53671'; /** * 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 d61fc4f0a6..6dc7857152 100644 --- a/wp-includes/wp-db.php +++ b/wp-includes/wp-db.php @@ -2041,7 +2041,6 @@ class wpdb { * } */ public function parse_db_host( $host ) { - $port = null; $socket = null; $is_ipv6 = false; @@ -2070,15 +2069,9 @@ class wpdb { return false; } - $host = ''; - foreach ( array( 'host', 'port' ) as $component ) { - if ( ! empty( $matches[ $component ] ) ) { - $$component = $matches[ $component ]; - } - } - + $host = ! empty( $matches['host'] ) ? $matches['host'] : ''; // MySQLi port cannot be a string; must be null or an integer. - $port = $port ? absint( $port ) : null; + $port = ! empty( $matches['port'] ) ? absint( $matches['port'] ) : null; return array( $host, $port, $socket, $is_ipv6 ); }