From 44a71b595e455e7d3f6422968ee575cb8c02fdf1 Mon Sep 17 00:00:00 2001 From: Dion Hulse Date: Tue, 27 Jun 2023 05:09:52 +0000 Subject: [PATCH] Upgrade/Install: Pass the full database version string to WordPress.org for parsing. This aims to make the provided statistical data more complete, by correctly identifying the version for a wider selection of database types and servers. Props mukesh27, costdev, spacedmonkey, johnbillion. Fixes #58584. git-svn-id: https://develop.svn.wordpress.org/trunk@56050 602fd350-edb4-49c9-b593-d223f7449a82 --- src/wp-includes/update.php | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/src/wp-includes/update.php b/src/wp-includes/update.php index 8e5302afab..1d2f55fbef 100644 --- a/src/wp-includes/update.php +++ b/src/wp-includes/update.php @@ -74,7 +74,9 @@ function wp_version_check( $extra_stats = array(), $force_check = false ) { $current->last_checked = time(); set_site_transient( 'update_core', $current ); - if ( method_exists( $wpdb, 'db_version' ) ) { + if ( method_exists( $wpdb, 'db_server_info' ) ) { + $mysql_version = $wpdb->db_server_info(); + } elseif ( method_exists( $wpdb, 'db_version' ) ) { $mysql_version = preg_replace( '/[^0-9.].*/', '', $wpdb->db_version() ); } else { $mysql_version = 'N/A';