Make WordPress Core

Changeset 26148


Ignore:
Timestamp:
11/14/2013 02:01:30 AM (11 years ago)
Author:
dd32
Message:

Background Updates: Fix a PHP Fatal error which could be encountered on some systems when using FTP. Fixes #25817 for trunk.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/wp-admin/includes/class-wp-upgrader.php

    r26049 r26148  
    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());
     
    18991900            'attempt_rollback'   => true, /* only available for core updates */
    19001901        ) );
     1902
     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        }
    19011907
    19021908        // Core doesn't output this, so lets append it so we don't get confused
Note: See TracChangeset for help on using the changeset viewer.