[wp-trac] [WordPress Trac] #51857: Add rollback for failed plugin/theme updates

WordPress Trac noreply at wordpress.org
Tue Aug 31 14:09:56 UTC 2021


#51857: Add rollback for failed plugin/theme updates
----------------------------------------------+-----------------------
 Reporter:  pbiron                            |       Owner:  pbiron
     Type:  enhancement                       |      Status:  reopened
 Priority:  normal                            |   Milestone:  5.9
Component:  Upgrade/Install                   |     Version:
 Severity:  normal                            |  Resolution:
 Keywords:  early has-patch has-testing-info  |     Focuses:
----------------------------------------------+-----------------------

Comment (by afragen):

 @SergeyBiryukov

 I'm using the updated Rollback Update Failure plugin which now has similar
 code as this patch.

 I discovered that my server has disable the `disk_free_space()` function
 and now anytime I visit the Site Health page I get the following error.

 > PHP Warning disk_free_space() has been disabled for security reasons in
 /sites/example.com/files/wp-content/plugins/rollback-update-
 failure/plugin.php on line 257

 which corresponds to the following line.

 > $available_space       = (int) disk_free_space( WP_CONTENT_DIR .
 '/upgrade/' );

 Perhaps a server check to `ini_get( 'disabled_functions' )` and setting to
 `false` if the function is not available?

 I'll see what I can test in the plugin.

-- 
Ticket URL: <https://core.trac.wordpress.org/ticket/51857#comment:112>
WordPress Trac <https://core.trac.wordpress.org/>
WordPress publishing platform


More information about the wp-trac mailing list