Make WordPress Core

Changeset 27278


Ignore:
Timestamp:
02/26/2014 04:19:45 AM (11 years ago)
Author:
nacin
Message:

Add a constant to disable mysqli for testing purposes. see #21663.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/wp-includes/wp-db.php

    r27277 r27278  
    570570
    571571        /* Use ext/mysqli if it exists and:
     572         *  - USE_EXT_MYSQL is defined as false, or
    572573         *  - We are a development version of WordPress, or
    573574         *  - We are running PHP 5.5 or greater, or
     
    575576         */
    576577        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 = ! USE_EXT_MYSQL;
     580            } elseif ( version_compare( phpversion(), '5.5', '>=' ) || ! function_exists( 'mysql_connect' ) ) {
    578581                $this->use_mysqli = true;
    579582            } elseif ( false !== strpos( $GLOBALS['wp_version'], '-' ) ) {
Note: See TracChangeset for help on using the changeset viewer.