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

WordPress Trac noreply at wordpress.org
Tue Aug 31 14:32:34 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):

 The following change fixes this issue in the plugin.

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

 changed to

 {{{$disabled                   = explode( ',',
 ini_get('disable_functions') );}}}
 {{{$available_space       = ! in_array( 'disk_free_space', $disabled, true
 ) ? (int) disk_free_space( WP_CONTENT_DIR . '/upgrade/' ) : false;}}}

 Currently testing in https://github.com/WordPress/rollback-update-
 failure/tree/develop

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


More information about the wp-trac mailing list