mirror of
https://github.com/WordPress/WordPress.git
synced 2024-12-24 01:57:53 +01:00
Upgrade: Don't fail a core update just because readme.html
or license.txt
couldn't be modified.
A number of locked down installs remove `readme.html` or make it inaccessible which would result in an update failure. Props polevaultweb for the initial patch. Fixes #31420. Built from https://develop.svn.wordpress.org/trunk@38898 git-svn-id: http://core.svn.wordpress.org/trunk@38841 1a063a9b-81f0-0310-95a4-ce76da25c4cd
This commit is contained in:
parent
913926c1bd
commit
2b788037c7
@ -907,6 +907,8 @@ function update_core($from, $to) {
|
||||
continue;
|
||||
if ( ! file_exists( $working_dir_local . $file ) )
|
||||
continue;
|
||||
if ( '.' === dirname( $file ) && in_array( pathinfo( $file, PATHINFO_EXTENSION ), array( 'html', 'txt' ) ) )
|
||||
continue;
|
||||
if ( md5_file( ABSPATH . $file ) === $checksum )
|
||||
$skip[] = $file;
|
||||
else
|
||||
@ -968,6 +970,10 @@ function update_core($from, $to) {
|
||||
continue;
|
||||
if ( ! file_exists( $working_dir_local . $file ) )
|
||||
continue;
|
||||
if ( '.' === dirname( $file ) && in_array( pathinfo( $file, PATHINFO_EXTENSION ), array( 'html', 'txt' ) ) ) {
|
||||
$skip[] = $file;
|
||||
continue;
|
||||
}
|
||||
if ( file_exists( ABSPATH . $file ) && md5_file( ABSPATH . $file ) == $checksum )
|
||||
$skip[] = $file;
|
||||
else
|
||||
|
@ -4,7 +4,7 @@
|
||||
*
|
||||
* @global string $wp_version
|
||||
*/
|
||||
$wp_version = '4.7-alpha-38897';
|
||||
$wp_version = '4.7-alpha-38898';
|
||||
|
||||
/**
|
||||
* Holds the WordPress DB revision, increments when changes are made to the WordPress DB schema.
|
||||
|
Loading…
Reference in New Issue
Block a user