diff --git a/wp-includes/version.php b/wp-includes/version.php index 53339ebd8f..40c637ee79 100644 --- a/wp-includes/version.php +++ b/wp-includes/version.php @@ -4,7 +4,7 @@ * * @global string $wp_version */ -$wp_version = '5.0-alpha-42387'; +$wp_version = '5.0-alpha-42388'; /** * 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 c44b09a566..674800a8a9 100644 --- a/wp-includes/wp-db.php +++ b/wp-includes/wp-db.php @@ -593,19 +593,12 @@ class wpdb { $this->show_errors(); } - /* Use ext/mysqli if it exists and: - * - WP_USE_EXT_MYSQL is defined as false, or - * - We are a development version of WordPress, or - * - We are running PHP 5.5 or greater, or - * - ext/mysql is not loaded. - */ + // Use ext/mysqli if it exists unless WP_USE_EXT_MYSQL is defined as true if ( function_exists( 'mysqli_connect' ) ) { + $this->use_mysqli = true; + if ( defined( 'WP_USE_EXT_MYSQL' ) ) { $this->use_mysqli = ! WP_USE_EXT_MYSQL; - } elseif ( version_compare( phpversion(), '5.5', '>=' ) || ! function_exists( 'mysql_connect' ) ) { - $this->use_mysqli = true; - } elseif ( false !== strpos( $GLOBALS['wp_version'], '-' ) ) { - $this->use_mysqli = true; } }