diff --git a/src/wp-admin/includes/class-wp-debug-data.php b/src/wp-admin/includes/class-wp-debug-data.php index 674ea4b464..f3ecdca9f2 100644 --- a/src/wp-admin/includes/class-wp-debug-data.php +++ b/src/wp-admin/includes/class-wp-debug-data.php @@ -719,7 +719,7 @@ class WP_Debug_Data { $extension = null; } - $server = $wpdb->db_version(); + $server = $wpdb->get_var( 'SELECT VERSION()' ); if ( isset( $wpdb->use_mysqli ) && $wpdb->use_mysqli ) { $client_version = $wpdb->dbh->client_info; diff --git a/src/wp-admin/includes/class-wp-site-health.php b/src/wp-admin/includes/class-wp-site-health.php index 01f97959c5..c759effd83 100644 --- a/src/wp-admin/includes/class-wp-site-health.php +++ b/src/wp-admin/includes/class-wp-site-health.php @@ -132,18 +132,16 @@ class WP_Site_Health { private function prepare_sql_data() { global $wpdb; - if ( method_exists( $wpdb, 'db_version' ) ) { - 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 - $mysql_server_type = mysql_get_server_info( $wpdb->dbh ); - } - - $this->mysql_server_version = $wpdb->db_version(); + 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 + $mysql_server_type = mysql_get_server_info( $wpdb->dbh ); } + $this->mysql_server_version = $wpdb->get_var( 'SELECT VERSION()' ); + $this->health_check_mysql_rec_version = '5.6'; if ( stristr( $mysql_server_type, 'mariadb' ) ) {