Make WordPress Core

Ticket #25652: 25652.2.diff

File 25652.2.diff, 910 bytes (added by dd32, 13 years ago)
  • src/wp-admin/includes/update-core.php

     
    728728                        // Store package-relative paths (the key) of non-writable files in the WP_Error object.
    729729                        $error_data = version_compare( $old_wp_version, '3.7-beta2', '>' ) ? array_keys( $files_not_writable ) : '';
    730730
    731                         if ( $files_not_writable )
    732                                 return new WP_Error( 'files_not_writable', __( 'Could not copy file.' ), $error_data );
     731                        if ( $files_not_writable ) {
     732                                $files_not_writable_error = new WP_Error( 'files_not_writable', __( 'WordPress cannot write to some files' ), $error_data );
     733                                if ( defined( 'DOING_CRON' ) && DOING_CRON )
     734                                        return $files_not_writable_error;
     735                                else
     736                                        show_message( $files_not_writable_error );
     737                        }
    733738                }
    734739        }
    735740