Make WordPress Core

Changeset 56050


Ignore:
Timestamp:
06/27/2023 05:09:52 AM (17 months ago)
Author:
dd32
Message:

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.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/wp-includes/update.php

    r55720 r56050  
    7575    set_site_transient( 'update_core', $current );
    7676
    77     if ( method_exists( $wpdb, 'db_version' ) ) {
     77    if ( method_exists( $wpdb, 'db_server_info' ) ) {
     78        $mysql_version = $wpdb->db_server_info();
     79    } elseif ( method_exists( $wpdb, 'db_version' ) ) {
    7880        $mysql_version = preg_replace( '/[^0-9.].*/', '', $wpdb->db_version() );
    7981    } else {
Note: See TracChangeset for help on using the changeset viewer.