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
This commit is contained in:
parent
3f51e08ac6
commit
bd084204c1
|
@ -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.
|
||||
|
|
|
@ -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 ) {
|
||||
|
|
Loading…
Reference in New Issue