Make WordPress Core


Ignore:
Timestamp:
09/28/2015 01:16:29 AM (10 years ago)
Author:
pento
Message:

WPDB: Make sure we don't run sanity checks on DB dropins.

Previously, we'd run the sanity checks if is_mysql was not set to false. This caused problems for DB drop-ins that didn't define is_mysql at all. Instead, we can just check if is_mysql is empty().

Also fix some unit tests that accidently ran correctly because of the strict false === comparison.

Fixes #33501.

File:
1 edited

Legend:

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

    r34529 r34655  
    24152415
    24162416        // Skip this entirely if this isn't a MySQL database.
    2417         if ( false === $this->is_mysql ) {
     2417        if ( empty( $this->is_mysql ) ) {
    24182418            return false;
    24192419        }
     
    24642464
    24652465        // Skip this entirely if this isn't a MySQL database.
    2466         if ( false === $this->is_mysql ) {
     2466        if ( empty( $this->is_mysql ) ) {
    24672467            return false;
    24682468        }
Note: See TracChangeset for help on using the changeset viewer.