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.



git-svn-id: https://develop.svn.wordpress.org/trunk@38439 602fd350-edb4-49c9-b593-d223f7449a82
This commit is contained in:
Gary Pendergast 2016-08-30 07:13:31 +00:00
parent 003616dbd9
commit fd7979ad63
1 changed files with 3 additions and 0 deletions

View File

@ -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 ) {