Ticket #44710: 44710.diff
File 44710.diff, 824 bytes (added by , 5 years ago) |
---|
-
wp-admin/includes/class-wp-upgrader.php
793 793 if ( is_wp_error( $result ) ) { 794 794 $this->skin->error( $result ); 795 795 $this->skin->feedback( 'process_failed' ); 796 797 // If it's a theme or plugin, delete the uploaded one from uploads directory. 798 if ( ! empty( $options['package'] ) && ! empty( $options['hook_extra']['type'] ) && ( 'plugin' === $options['hook_extra']['type'] || 'theme' === $options['hook_extra']['type'] ) ) { 799 800 global $wp_filesystem; 801 802 $wp_filesystem->delete( $options['package'] ); 803 } 796 804 } else { 797 805 // Installation succeeded. 798 806 $this->skin->feedback( 'process_success' );