Changeset 25772 for trunk/src/wp-admin/includes/update-core.php
- Timestamp:
- 10/14/2013 07:37:53 PM (12 years ago)
- File:
-
- 1 edited
-
trunk/src/wp-admin/includes/update-core.php (modified) (3 diffs)
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/wp-admin/includes/update-core.php
r25763 r25772 766 766 if ( @is_dir($lang_dir) ) { 767 767 $wp_lang_dir = $wp_filesystem->find_folder($lang_dir); 768 if ( $wp_lang_dir ) 768 if ( $wp_lang_dir ) { 769 769 $result = copy_dir($from . $distro . 'wp-content/languages/', $wp_lang_dir); 770 if ( is_wp_error( $result ) ) 771 $result = new WP_Error( $result->get_error_code() . '_languages', $result->get_error_message(), $result->get_error_data() ); 772 } 770 773 } 771 774 } … … 804 807 805 808 if ( ! $wp_filesystem->copy($from . $distro . 'wp-content/' . $file, $dest . $filename, FS_CHMOD_FILE) ) 806 $result = new WP_Error( 'copy_failed_for_new_bundled', __( 'Could not copy file.' ), $dest . $filename );809 $result = new WP_Error( "copy_failed_for_new_bundled_$type", __( 'Could not copy file.' ), $dest . $filename ); 807 810 } else { 808 811 if ( ! $development_build && $wp_filesystem->is_dir( $dest . $filename ) ) … … 811 814 $wp_filesystem->mkdir($dest . $filename, FS_CHMOD_DIR); 812 815 $_result = copy_dir( $from . $distro . 'wp-content/' . $file, $dest . $filename); 813 if ( is_wp_error($_result) ) //If a error occurs partway through this final step, keep the error flowing through, but keep process going. 814 $result = $_result; 816 817 // If a error occurs partway through this final step, keep the error flowing through, but keep process going. 818 if ( is_wp_error( $_result ) ) { 819 if ( ! is_wp_error( $result ) ) 820 $result = new WP_Error; 821 $result->add( $_result->get_error_code() . "_$type", $_result->get_error_message(), $_result->get_error_data() ); 822 } 815 823 } 816 824 }
Note: See TracChangeset
for help on using the changeset viewer.