mirror of
https://github.com/gosticks/wordpress-develop.git
synced 2025-10-16 12:05:38 +00:00
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. git-svn-id: https://develop.svn.wordpress.org/trunk@54065 602fd350-edb4-49c9-b593-d223f7449a82
This commit is contained in:
parent
18acdb68f5
commit
fd1bd360b0
@ -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()' );
|
||||
|
||||
|
||||
Loading…
Reference in New Issue
Block a user