From bd084204c1d865691057b1fc0750906a7c7974e7 Mon Sep 17 00:00:00 2001 From: Gary Pendergast Date: Tue, 30 Aug 2016 07:14:41 +0000 Subject: [PATCH] Database: Ensure that variables are defined correctly. There were some cases where some local variables in `wpdb::init_charset()` could be undefined when they were used. Props Frozzare. Fixes #37683 for trunk. Built from https://develop.svn.wordpress.org/trunk@38439 git-svn-id: http://core.svn.wordpress.org/trunk@38380 1a063a9b-81f0-0310-95a4-ce76da25c4cd --- wp-includes/version.php | 2 +- wp-includes/wp-db.php | 3 +++ 2 files changed, 4 insertions(+), 1 deletion(-) diff --git a/wp-includes/version.php b/wp-includes/version.php index 37f29ced99..c19da62375 100644 --- a/wp-includes/version.php +++ b/wp-includes/version.php @@ -4,7 +4,7 @@ * * @global string $wp_version */ -$wp_version = '4.7-alpha-38438'; +$wp_version = '4.7-alpha-38439'; /** * 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 102deab448..3c07900a72 100644 --- a/wp-includes/wp-db.php +++ b/wp-includes/wp-db.php @@ -734,6 +734,9 @@ class wpdb { * @since 3.1.0 */ public function init_charset() { + $charset = ''; + $collate = ''; + if ( function_exists('is_multisite') && is_multisite() ) { $charset = 'utf8'; if ( defined( 'DB_COLLATE' ) && DB_COLLATE ) {