Make WordPress Core

Ticket #32435: terrafrost.patch

File terrafrost.patch, 1.7 KB (added by TerraFrost, 10 years ago)

patch fixing this issue

  • wp-admin/includes/ajax-actions.php

    From fe32e9f65b39d475545895f272e076835f58579c Mon Sep 17 00:00:00 2001
    From: terrafrost <terrafrost@php.net>
    Date: Mon, 18 May 2015 23:35:06 -0500
    Subject: [PATCH] ...
    
    ---
     wp-admin/includes/ajax-actions.php      | 1 +
     wp-admin/includes/class-wp-upgrader.php | 3 ++-
     2 files changed, 3 insertions(+), 1 deletion(-)
    
    diff --git a/wp-admin/includes/ajax-actions.php b/wp-admin/includes/ajax-actions.php
    index 1addff7..aad8e95 100644
    a b function wp_ajax_update_plugin() { 
    29472947
    29482948                wp_send_json_success( $status );
    29492949        } else if ( is_wp_error( $result ) ) {
     2950                $status['errorCode'] = 'unable_to_connect_to_filesystem';
    29502951                $status['error'] = $result->get_error_message();
    29512952                wp_send_json_error( $status );
    29522953        } else if ( is_bool( $result ) && ! $result ) {
  • wp-admin/includes/class-wp-upgrader.php

    diff --git a/wp-admin/includes/class-wp-upgrader.php b/wp-admin/includes/class-wp-upgrader.php
    index acab417..062a680 100644
    a b class Plugin_Upgrader extends WP_Upgrader { 
    836836         * @return array|false An array of results indexed by plugin file, or false if unable to connect to the filesystem.
    837837         */
    838838        public function bulk_upgrade( $plugins, $args = array() ) {
     839                global $wp_filesystem;
    839840
    840841                $defaults = array(
    841842                        'clear_update_cache' => true,
    class Plugin_Upgrader extends WP_Upgrader { 
    856857                $res = $this->fs_connect( array(WP_CONTENT_DIR, WP_PLUGIN_DIR) );
    857858                if ( ! $res ) {
    858859                        $this->skin->footer();
    859                         return false;
     860                        return $wp_filesystem->errors;
    860861                }
    861862
    862863                $this->skin->bulk_header();