[wp-trac] [WordPress Trac] #25817: PHP Fatal error on background update: $wp_filesystem is not an object

WordPress Trac noreply at wordpress.org
Mon Nov 4 17:38:52 UTC 2013


#25817: PHP Fatal error on background update: $wp_filesystem is not an object
-----------------------------+--------------------
 Reporter:  markjaquith      |       Owner:
     Type:  defect (bug)     |      Status:  new
 Priority:  high             |   Milestone:  3.7.2
Component:  Upgrade/Install  |     Version:  3.7
 Severity:  major            |  Resolution:
 Keywords:  has-patch        |
-----------------------------+--------------------
Changes (by SergeyBiryukov):

 * keywords:   => has-patch


Comment:

 In case of an error, `WP_Upgrader::fs_connect()` returns either false
 (before `$wp_filesystem` global is set) or a `WP_Error` object:
 [source:tags/3.7.1/src/wp-admin/includes/class-wp-upgrader.php#L62].

 In `WP_Upgrader::run()`, we check for both: [source:tags/3.7.1/src/wp-
 admin/includes/class-wp-upgrader.php#L313].

 In `Plugin_Upgrader::bulk_upgrade()`, `Theme_Upgrader::bulk_upgrade()`,
 and `Language_Pack_Upgrader::bulk_upgrade()`, we check for false before
 calling `$this->run()`:
 [source:tags/3.7.1/src/wp-admin/includes/class-wp-upgrader.php#L536]
 [source:tags/3.7.1/src/wp-admin/includes/class-wp-upgrader.php#L921]
 [source:tags/3.7.1/src/wp-admin/includes/class-wp-upgrader.php#L1180]

 In `Core_Upgrader::upgrade()`, however, we only check for `is_wp_error()`:
 [source:tags/3.7.1/src/wp-admin/includes/class-wp-upgrader.php#L1335]

 I guess we should check for false as well.

--
Ticket URL: <http://core.trac.wordpress.org/ticket/25817#comment:1>
WordPress Trac <http://core.trac.wordpress.org/>
WordPress blogging software


More information about the wp-trac mailing list