Make WordPress Core

Ticket #25817: 25817.diff

File 25817.diff, 1009 bytes (added by dd32, 12 years ago)
  • src/wp-admin/includes/class-wp-upgrader.php

     
    13341334                        return new WP_Error('up_to_date', $this->strings['up_to_date']);
    13351335
    13361336                $res = $this->fs_connect( array(ABSPATH, WP_CONTENT_DIR) );
    1337                 if ( is_wp_error($res) )
     1337                if ( ! $res || is_wp_error( $res ) ) {
    13381338                        return $res;
     1339                }
    13391340
    13401341                $wp_dir = trailingslashit($wp_filesystem->abspath());
    13411342
     
    18991900                        'attempt_rollback'   => true, /* only available for core updates */
    19001901                ) );
    19011902
     1903                // if the filesystem is unavailable, false is returned.
     1904                if ( false === $upgrade_result ) {
     1905                        $upgrade_result = new WP_Error( 'fs_unavailable', __( 'Could not access filesystem.' ) );                       
     1906                }
     1907
    19021908                // Core doesn't output this, so lets append it so we don't get confused
    19031909                if ( 'core' == $type ) {
    19041910                        if ( is_wp_error( $upgrade_result ) ) {