Only add error data to the files_not_writable WP_Error if the install already has [25775] and [25796] applied.

see #22704.


git-svn-id: https://develop.svn.wordpress.org/trunk@25797 602fd350-edb4-49c9-b593-d223f7449a82
This commit is contained in:
Andrew Nacin 2013-10-15 20:00:01 +00:00
parent 55d176020b
commit 0a284a4d5c
1 changed files with 3 additions and 1 deletions

View File

@ -722,8 +722,10 @@ function update_core($from, $to) {
}
// Store package-relative paths (the key) of non-writable files in the WP_Error object.
$error_data = version_compare( $old_wp_version, '3.7-beta2', '>' ) ? array_keys( $files_not_writable ) : '';
if ( $files_not_writable )
return new WP_Error( 'files_not_writable', __( 'Could not copy file.' ), array_keys( $files_not_writable ) );
return new WP_Error( 'files_not_writable', __( 'Could not copy file.' ), $data );
}
}