Make WordPress Core

Changeset 45782


Ignore:
Timestamp:
08/12/2019 01:53:17 AM (6 years ago)
Author:
SergeyBiryukov
Message:

Site Health: Add database charset and collation information to debug info.

Props sharaz, Clorith, SergeyBiryukov.
Fixes #47828.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/wp-admin/includes/class-wp-debug-data.php

    r45691 r45782  
    295295                    'debug' => $wp_local_dev_debug,
    296296                ),
     297                'DB_CHARSET'          => array(
     298                    'label' => 'DB_CHARSET',
     299                    'value' => ( defined( 'DB_CHARSET' ) ? DB_CHARSET : __( 'Undefined' ) ),
     300                    'debug' => ( defined( 'DB_CHARSET' ) ? DB_CHARSET : 'undefined' ),
     301                ),
     302                'DB_COLLATE'          => array(
     303                    'label' => 'DB_COLLATE',
     304                    'value' => ( defined( 'DB_COLLATE' ) ? DB_COLLATE : __( 'Undefined' ) ),
     305                    'debug' => ( defined( 'DB_COLLATE' ) ? DB_COLLATE : 'undefined' ),
     306                ),
    297307            ),
    298308        );
     
    755765            'label'   => __( 'Database prefix' ),
    756766            'value'   => $wpdb->prefix,
     767            'private' => true,
     768        );
     769
     770        $info['wp-database']['fields']['database_charset'] = array(
     771            'label'   => __( 'Database charset' ),
     772            'value'   => $wpdb->charset,
     773            'private' => true,
     774        );
     775
     776        $info['wp-database']['fields']['database_collate'] = array(
     777            'label'   => __( 'Database collation' ),
     778            'value'   => $wpdb->collate,
    757779            'private' => true,
    758780        );
Note: See TracChangeset for help on using the changeset viewer.