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

WordPress Trac noreply at wordpress.org
Tue Nov 5 01:52:01 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        |
-----------------------------+--------------------

Comment (by dd32):

 Correct fix is to check for false, like [attachment:25817.patch] to avoid
 the Fatal.

 However, `WP_Automatic_Updater` doesn't expect a false return either and
 may fail further down the stack somewhere in the notify emails/etc. as
 they expect `true` or `WP_Error`.

 I've had a few days to think about how this is possible to trigger, and I
 can't think of a easy way to trigger it.
 There are several ways:
 1. Have a filter on filesystem_method that is removed between Background
 updates triggering, and Core attempting an upgrade
 2. Have disk IO issues where get_filesystem_method() returns Direct on the
 first call, but FTP on the Core update check
 3. Have an incorrect password defined in FTP_PASS (probably the easiest
 way)
 4. Have `WP_Filesystem()` not be able to include the Class, or the FTP
 Server timeout.

 So I'm not sure how Mark triggered this, but would love to know if it's
 reproducible .

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


More information about the wp-trac mailing list