diff --git a/wp-includes/version.php b/wp-includes/version.php index d9c2294428..29d58cfce3 100644 --- a/wp-includes/version.php +++ b/wp-includes/version.php @@ -4,7 +4,7 @@ * * @global string $wp_version */ -$wp_version = '4.6-alpha-37520'; +$wp_version = '4.6-alpha-37521'; /** * 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 6fcc31a7eb..8d9f84c63e 100644 --- a/wp-includes/wp-db.php +++ b/wp-includes/wp-db.php @@ -757,8 +757,13 @@ class wpdb { $this->charset = 'utf8mb4'; } - if ( 'utf8mb4' === $this->charset && ( ! $this->collate || stripos( $this->collate, 'utf8_' ) === 0 ) ) { - $this->collate = 'utf8mb4_unicode_ci'; + if ( 'utf8mb4' === $this->charset ) { + // _general_ is outdated, so we can upgrade it to _unicode_, instead. + if ( ! $this->collate || 'utf8_general_ci' === $this->collate ) { + $this->collate = 'utf8mb4_unicode_ci'; + } else { + $this->collate = str_replace( 'utf8_', 'utf8mb4_', $this->collate ); + } } }