Automatic updates: An error code containing 'do_rollback' can be used to trigger a rollback.
This could enable the triggering of a rollback in update_core() in wp-admin/includes/update-core.php. see #22704. git-svn-id: https://develop.svn.wordpress.org/trunk@25782 602fd350-edb4-49c9-b593-d223f7449a82
This commit is contained in:
parent
1918e828da
commit
85d32ce873
@ -1305,7 +1305,10 @@ class Core_Upgrader extends WP_Upgrader {
|
|||||||
$error_code = $result->get_error_code();
|
$error_code = $result->get_error_code();
|
||||||
// Not all errors are equal. These codes are critical: copy_failed__copy_dir,
|
// Not all errors are equal. These codes are critical: copy_failed__copy_dir,
|
||||||
// mkdir_failed__copy_dir, copy_failed__copy_dir_retry, and disk_full.
|
// mkdir_failed__copy_dir, copy_failed__copy_dir_retry, and disk_full.
|
||||||
if ( false !== strpos( $error_code, '__copy_dir' ) )
|
// do_rollback allows for update_core() to trigger a rollback if needed.
|
||||||
|
if ( false !== strpos( $error_code, 'do_rollback' ) )
|
||||||
|
$try_rollback = true;
|
||||||
|
elseif ( false !== strpos( $error_code, '__copy_dir' ) )
|
||||||
$try_rollback = true;
|
$try_rollback = true;
|
||||||
elseif ( 'disk_full' === $error_code )
|
elseif ( 'disk_full' === $error_code )
|
||||||
$try_rollback = true;
|
$try_rollback = true;
|
||||||
|
Loading…
Reference in New Issue
Block a user