mirror of
https://github.com/gosticks/wordpress-develop.git
synced 2026-08-11 12:20:22 +00:00
Use mysqli for WordPress development versions, regardless of PHP version, to increase testing footprint.
Allow the lack of ext/mysql to pass wp_check_php_mysql_versions(). see #21663. git-svn-id: https://develop.svn.wordpress.org/trunk@27257 602fd350-edb4-49c9-b593-d223f7449a82
This commit is contained in:
@@ -568,7 +568,18 @@ class wpdb {
|
||||
if ( WP_DEBUG && WP_DEBUG_DISPLAY )
|
||||
$this->show_errors();
|
||||
|
||||
$this->use_mysqli = ( version_compare( phpversion(), '5.5', '>=' ) && function_exists( 'mysqli_connect' ) );
|
||||
/* Use ext/mysqli if it exists and:
|
||||
* - We are a development version of WordPress, or
|
||||
* - We are running PHP 5.5 or greater, or
|
||||
* - ext/mysql is not loaded.
|
||||
*/
|
||||
if ( function_exists( 'mysqli_connect' ) ) {
|
||||
if ( version_compare( phpversion(), '5.5', '>=' ) || ! function_exists( 'mysql_connect' ) ) {
|
||||
$this->use_mysqli = true;
|
||||
} elseif ( false !== strpos( $GLOBALS['wp_version'], '-' ) ) {
|
||||
$this->use_mysqli = true;
|
||||
}
|
||||
}
|
||||
|
||||
$this->init_charset();
|
||||
|
||||
|
||||
Reference in New Issue
Block a user