From e5fd46da70f0a5c008d3b754dd3a435bdb89d481 Mon Sep 17 00:00:00 2001 From: Sergey Biryukov Date: Sun, 4 Sep 2022 14:40:14 +0000 Subject: [PATCH] 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 --- wp-admin/includes/class-wp-site-health.php | 8 +------- wp-includes/version.php | 2 +- 2 files changed, 2 insertions(+), 8 deletions(-) diff --git a/wp-admin/includes/class-wp-site-health.php b/wp-admin/includes/class-wp-site-health.php index 9e6815f180..2714f613f2 100644 --- a/wp-admin/includes/class-wp-site-health.php +++ b/wp-admin/includes/class-wp-site-health.php @@ -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()' ); diff --git a/wp-includes/version.php b/wp-includes/version.php index 113ceaac70..601649e9d8 100644 --- a/wp-includes/version.php +++ b/wp-includes/version.php @@ -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.