Make WordPress Core

Changeset 27881


Ignore:
Timestamp:
04/01/2014 02:57:52 AM (13 years ago)
Author:
nacin
Message:

Background Updates: Fix a PHP fatal error which could be encountered on some systems when using FTP.

Merges [26148] from 3.8 to the 3.7 branch.

props dd32.
fixes #25817.

Location:
branches/3.7
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • branches/3.7

  • branches/3.7/src/wp-admin/includes/class-wp-upgrader.php

    r25981 r27881  
    13341334
    13351335                $res = $this->fs_connect( array(ABSPATH, WP_CONTENT_DIR) );
    1336                 if ( is_wp_error($res) )
     1336                if ( ! $res || is_wp_error( $res ) ) {
    13371337                        return $res;
     1338                }
    13381339
    13391340                $wp_dir = trailingslashit($wp_filesystem->abspath());
    … …  
    18971898                        'attempt_rollback'   => true, /* only available for core updates */
    18981899                ) );
     1900
     1901                // if the filesystem is unavailable, false is returned.
     1902                if ( false === $upgrade_result ) {
     1903                        $upgrade_result = new WP_Error( 'fs_unavailable', __( 'Could not access filesystem.' ) );                       
     1904                }
    18991905
    19001906                // 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.