Avoid our pre-flight writable checks if get_core_checksums() doesn't exist yet.

Thus, it will not work for 3.6 => 3.7, only 3.7+.

see #22704.


git-svn-id: https://develop.svn.wordpress.org/trunk@25798 602fd350-edb4-49c9-b593-d223f7449a82
This commit is contained in:
Andrew Nacin 2013-10-15 20:34:02 +00:00
parent 0a284a4d5c
commit 1e8729b5c1

View File

@ -710,7 +710,7 @@ function update_core($from, $to) {
} }
// If we're using the direct method, we can predict write failures that are due to permissions. // If we're using the direct method, we can predict write failures that are due to permissions.
if ( $wp_filesystem->method === 'direct' ) { if ( $check_is_writable && 'direct' === $wp_filesystem->method ) {
$files_writable = array_filter( $check_is_writable, array( $wp_filesystem, 'is_writable' ) ); $files_writable = array_filter( $check_is_writable, array( $wp_filesystem, 'is_writable' ) );
if ( $files_writable !== $check_is_writable ) { if ( $files_writable !== $check_is_writable ) {
$files_not_writable = array_diff_key( $check_is_writable, $files_writable ); $files_not_writable = array_diff_key( $check_is_writable, $files_writable );