WordPress.org

Make WordPress Core

Changeset 25648


Ignore:
Timestamp:
09/29/13 23:07:59 (3 years ago)
Author:
dd32
Message:

MD5 file verification: Prevent md5_file() warnings when files don't exist, additionally, don't verify wp-content files as they can be updated separately, as well as WP_CONTENT_DIR being set elsewhere. See #22704 See #18201

Location:
trunk/src/wp-admin/includes
Files:
2 edited

Legend:

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

    r25647 r25648  
    13581358 
    13591359        foreach ( $checksums[ $wp_version ] as $file => $checksum ) { 
    1360             if ( md5_file( ABSPATH . $file ) !== $checksum ) 
     1360            // Skip files which get updated 
     1361            if ( 'wp-content' == substr( $file, 0, 10 ) ) 
     1362                continue; 
     1363            if ( ! file_exists( ABSPATH . $file ) || md5_file( ABSPATH . $file ) !== $checksum ) 
    13611364                return false; 
    13621365        } 
  • trunk/src/wp-admin/includes/update-core.php

    r25540 r25648  
    699699        if ( ! empty( $checksums[ $wp_version ] ) && is_array( $checksums[ $wp_version ] ) ) { 
    700700            foreach( $checksums[ $wp_version ] as $file => $checksum ) { 
    701                 if ( md5_file( ABSPATH . $file ) === $checksum ) 
     701                if ( 'wp-content' == substr( $file, 0, 10 ) ) 
     702                    continue; 
     703                if ( file_exists( ABSPATH . $file ) && md5_file( ABSPATH . $file ) === $checksum ) 
    702704                    $skip[] = $file; 
    703705            } 
Note: See TracChangeset for help on using the changeset viewer.