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:
parent
003616dbd9
commit
fd7979ad63
@ -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
Block a user