From 9347f1af716bfac83c4b581eae8e7a329457bcd6 Mon Sep 17 00:00:00 2001 From: Gary Pendergast Date: Mon, 28 Sep 2015 01:17:24 +0000 Subject: [PATCH] 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. Built from https://develop.svn.wordpress.org/trunk@34655 git-svn-id: http://core.svn.wordpress.org/trunk@34619 1a063a9b-81f0-0310-95a4-ce76da25c4cd --- wp-includes/version.php | 2 +- wp-includes/wp-db.php | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/wp-includes/version.php b/wp-includes/version.php index c0c619d979..db6324be2a 100644 --- a/wp-includes/version.php +++ b/wp-includes/version.php @@ -4,7 +4,7 @@ * * @global string $wp_version */ -$wp_version = '4.4-alpha-34654'; +$wp_version = '4.4-alpha-34655'; /** * 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 02d852683e..e52d6fd2f4 100644 --- a/wp-includes/wp-db.php +++ b/wp-includes/wp-db.php @@ -2414,7 +2414,7 @@ class wpdb { } // Skip this entirely if this isn't a MySQL database. - if ( false === $this->is_mysql ) { + if ( empty( $this->is_mysql ) ) { return false; } @@ -2463,7 +2463,7 @@ class wpdb { $columnkey = strtolower( $column ); // Skip this entirely if this isn't a MySQL database. - if ( false === $this->is_mysql ) { + if ( empty( $this->is_mysql ) ) { return false; }