diff --git src/wp-admin/includes/update-core.php src/wp-admin/includes/update-core.php
index a5947e871e..5f5f30bfc3 100644
|
|
function update_core( $from, $to ) { |
1179 | 1179 | if ( ! $wp_filesystem->exists( $old_file ) ) { |
1180 | 1180 | continue; |
1181 | 1181 | } |
1182 | | $wp_filesystem->delete( $old_file, true ); |
| 1182 | |
| 1183 | // If the file isn't deleted, try writing an empty string to the file. |
| 1184 | if ( ! $wp_filesystem->delete( $old_file, true ) && is_file( $old_file ) ) { |
| 1185 | $wp_filesystem->put_contents( $old_file, '' ); |
| 1186 | }; |
1183 | 1187 | } |
1184 | 1188 | |
1185 | 1189 | // Remove any Genericons example.html's from the filesystem |