WordPress.org

Make WordPress Core

Changeset 25805


Ignore:
Timestamp:
10/16/2013 04:01:12 AM (5 years ago)
Author:
nacin
Message:

Avoid numerous potential PHP warnings when dealing with the pre-r25801 get_core_checksums() return value.

Warnings included current(), filestat(), and md5_file().

see #18201. see #22704.

File:
1 edited

Legend:

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

    r25801 r25805  
    698698    if ( function_exists( 'get_core_checksums' ) ) {
    699699        $checksums = get_core_checksums( $wp_version, isset( $wp_local_package ) ? $wp_local_package : 'en_US' );
    700         if ( is_array( current( $checksums ) ) ) // Compat code for 3.7-beta2
    701             $checksums = current( $checksums );
     700        if ( is_array( $checksums ) && isset( $checksums[ $wp_version ] ) )
     701            $checksums = $checksums[ $wp_version ]; // Compat code for 3.7-beta2
    702702        if ( is_array( $checksums ) ) {
    703703            foreach( $checksums as $file => $checksum ) {
Note: See TracChangeset for help on using the changeset viewer.