Site Health: Standardize on SELECT VERSION() query for checking the database server version, due to the MariaDB version declaration potentially causing issues in production environments.

Partially reverts [45691].

Props Clorith.
Fixes #47738.

git-svn-id: https://develop.svn.wordpress.org/trunk@45904 602fd350-edb4-49c9-b593-d223f7449a82
This commit is contained in:
Sergey Biryukov
2019-08-28 03:07:59 +00:00
parent 2d0cb482ed
commit 83efbc67e3
2 changed files with 9 additions and 11 deletions

View File

@@ -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;