Ticket #25817: 25817.diff
| File 25817.diff, 1009 bytes (added by , 12 years ago) |
|---|
-
src/wp-admin/includes/class-wp-upgrader.php
1334 1334 return new WP_Error('up_to_date', $this->strings['up_to_date']); 1335 1335 1336 1336 $res = $this->fs_connect( array(ABSPATH, WP_CONTENT_DIR) ); 1337 if ( is_wp_error($res) )1337 if ( ! $res || is_wp_error( $res ) ) { 1338 1338 return $res; 1339 } 1339 1340 1340 1341 $wp_dir = trailingslashit($wp_filesystem->abspath()); 1341 1342 … … 1899 1900 'attempt_rollback' => true, /* only available for core updates */ 1900 1901 ) ); 1901 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 } 1907 1902 1908 // Core doesn't output this, so lets append it so we don't get confused 1903 1909 if ( 'core' == $type ) { 1904 1910 if ( is_wp_error( $upgrade_result ) ) {