Make WordPress Core


Ignore:
Timestamp:
10/05/2024 10:49:43 PM (4 months ago)
Author:
azaozz
Message:

General: Do not use the new wp_get_wp_version() in update-core.php and class-core-upgrader.php.

All functions that are used there must be present in both the previous version being upgraded from, and the later version that's being installed (e.g. when rolling back Core) as these files are used in both.

Props djennez, SergeyBiryukov, jorbin, peterwilsoncc, azaozz.
Fixes #62165.
See 61627.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/wp-admin/includes/class-core-upgrader.php

    r59159 r59180  
    1313 * It allows for WordPress to upgrade itself in combination with
    1414 * the wp-admin/includes/update-core.php file.
     15 *
     16 * Note: newly introduced functions and methods cannot be used here.
     17 * All functions must be present in both the previous version being upgraded from,
     18 * and the later version that's being installed (e.g. when rolling back Core)
     19 * as this file is used in both.
    1520 *
    1621 * @since 2.8.0
     
    392397     * @since 3.7.0
    393398     *
     399     * @global string $wp_version       The WordPress version string.
    394400     * @global string $wp_local_package Locale code of the package.
    395401     *
     
    397403     */
    398404    public function check_files() {
    399         global $wp_local_package;
    400         $wp_version = wp_get_wp_version();
     405        global $wp_version, $wp_local_package;
    401406
    402407        $checksums = get_core_checksums( $wp_version, isset( $wp_local_package ) ? $wp_local_package : 'en_US' );
Note: See TracChangeset for help on using the changeset viewer.