Site Health: Use `$wpdb->db_server_info()` to retrieve database server type.
This updates an older fragment in `WP_Site_Health::prepare_sql_data()` to use a dedicated `$wpdb` method introduced later in WordPress 5.5 specifically for retrieving the database server information. Follow-up to [44986], [47451]. Props hilayt24, mukesh27, Clorith, SergeyBiryukov. Fixes #56484. Built from https://develop.svn.wordpress.org/trunk@54065 git-svn-id: http://core.svn.wordpress.org/trunk@53624 1a063a9b-81f0-0310-95a4-ce76da25c4cd
This commit is contained in:
parent
0eae4e0074
commit
e5fd46da70
|
@ -205,13 +205,7 @@ class WP_Site_Health {
|
|||
private function prepare_sql_data() {
|
||||
global $wpdb;
|
||||
|
||||
if ( $wpdb->use_mysqli ) {
|
||||
// phpcs:ignore WordPress.DB.RestrictedFunctions.mysql_mysqli_get_server_info
|
||||
$mysql_server_type = mysqli_get_server_info( $wpdb->dbh );
|
||||
} else {
|
||||
// phpcs:ignore WordPress.DB.RestrictedFunctions.mysql_mysql_get_server_info,PHPCompatibility.Extensions.RemovedExtensions.mysql_DeprecatedRemoved
|
||||
$mysql_server_type = mysql_get_server_info( $wpdb->dbh );
|
||||
}
|
||||
$mysql_server_type = $wpdb->db_server_info();
|
||||
|
||||
$this->mysql_server_version = $wpdb->get_var( 'SELECT VERSION()' );
|
||||
|
||||
|
|
|
@ -16,7 +16,7 @@
|
|||
*
|
||||
* @global string $wp_version
|
||||
*/
|
||||
$wp_version = '6.1-alpha-54064';
|
||||
$wp_version = '6.1-alpha-54065';
|
||||
|
||||
/**
|
||||
* Holds the WordPress DB revision, increments when changes are made to the WordPress DB schema.
|
||||
|
|
Loading…
Reference in New Issue