mirror of
https://github.com/gosticks/wordpress-develop.git
synced 2026-08-16 23:00:21 +00:00
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
git-svn-id: https://develop.svn.wordpress.org/trunk@25648 602fd350-edb4-49c9-b593-d223f7449a82
This commit is contained in:
@@ -1357,7 +1357,10 @@ class Core_Upgrader extends WP_Upgrader {
|
||||
return false;
|
||||
|
||||
foreach ( $checksums[ $wp_version ] as $file => $checksum ) {
|
||||
if ( md5_file( ABSPATH . $file ) !== $checksum )
|
||||
// Skip files which get updated
|
||||
if ( 'wp-content' == substr( $file, 0, 10 ) )
|
||||
continue;
|
||||
if ( ! file_exists( ABSPATH . $file ) || md5_file( ABSPATH . $file ) !== $checksum )
|
||||
return false;
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user