Ticket #21663: 21663.13.diff
File 21663.13.diff, 977 bytes (added by , 11 years ago) |
---|
-
src/wp-includes/wp-db.php
569 569 $this->show_errors(); 570 570 571 571 /* Use ext/mysqli if it exists and: 572 * - USE_EXT_MYSQL is defined as false, or 572 573 * - We are a development version of WordPress, or 573 574 * - We are running PHP 5.5 or greater, or 574 575 * - ext/mysql is not loaded. 575 576 */ 576 577 if ( function_exists( 'mysqli_connect' ) ) { 577 if ( version_compare( phpversion(), '5.5', '>=' ) || ! function_exists( 'mysql_connect' ) ) { 578 if ( defined( 'USE_EXT_MYSQL' ) ) { 579 $this->use_mysqli = (bool) USE_EXT_MYSQL; 580 } elseif ( version_compare( phpversion(), '5.5', '>=' ) || ! function_exists( 'mysql_connect' ) ) { 578 581 $this->use_mysqli = true; 579 582 } elseif ( false !== strpos( $GLOBALS['wp_version'], '-' ) ) { 580 583 $this->use_mysqli = true; 581 }582 584 } 583 585 584 586 $this->init_charset();