From 99f4ff2578391d76907ec1077abbb9be2c095ec0 Mon Sep 17 00:00:00 2001 From: Sergey Biryukov Date: Mon, 12 Aug 2019 01:54:57 +0000 Subject: [PATCH] Site Health: Add database charset and collation information to debug info. Props sharaz, Clorith, SergeyBiryukov. Fixes #47828. Built from https://develop.svn.wordpress.org/trunk@45782 git-svn-id: http://core.svn.wordpress.org/trunk@45593 1a063a9b-81f0-0310-95a4-ce76da25c4cd --- wp-admin/includes/class-wp-debug-data.php | 22 ++++++++++++++++++++++ wp-includes/version.php | 2 +- 2 files changed, 23 insertions(+), 1 deletion(-) diff --git a/wp-admin/includes/class-wp-debug-data.php b/wp-admin/includes/class-wp-debug-data.php index 5f433ad741..963824afe6 100644 --- a/wp-admin/includes/class-wp-debug-data.php +++ b/wp-admin/includes/class-wp-debug-data.php @@ -294,6 +294,16 @@ class WP_Debug_Data { 'value' => $wp_local_dev, 'debug' => $wp_local_dev_debug, ), + 'DB_CHARSET' => array( + 'label' => 'DB_CHARSET', + 'value' => ( defined( 'DB_CHARSET' ) ? DB_CHARSET : __( 'Undefined' ) ), + 'debug' => ( defined( 'DB_CHARSET' ) ? DB_CHARSET : 'undefined' ), + ), + 'DB_COLLATE' => array( + 'label' => 'DB_COLLATE', + 'value' => ( defined( 'DB_COLLATE' ) ? DB_COLLATE : __( 'Undefined' ) ), + 'debug' => ( defined( 'DB_COLLATE' ) ? DB_COLLATE : 'undefined' ), + ), ), ); @@ -757,6 +767,18 @@ class WP_Debug_Data { 'private' => true, ); + $info['wp-database']['fields']['database_charset'] = array( + 'label' => __( 'Database charset' ), + 'value' => $wpdb->charset, + 'private' => true, + ); + + $info['wp-database']['fields']['database_collate'] = array( + 'label' => __( 'Database collation' ), + 'value' => $wpdb->collate, + 'private' => true, + ); + // List must use plugins if there are any. $mu_plugins = get_mu_plugins(); diff --git a/wp-includes/version.php b/wp-includes/version.php index 411a832c6a..34d0197ef4 100644 --- a/wp-includes/version.php +++ b/wp-includes/version.php @@ -13,7 +13,7 @@ * * @global string $wp_version */ -$wp_version = '5.3-alpha-45781'; +$wp_version = '5.3-alpha-45782'; /** * Holds the WordPress DB revision, increments when changes are made to the WordPress DB schema.