WordPress.org

Make WordPress Core

Changeset 25782


Ignore:
Timestamp:
10/15/13 02:58:07 (3 years ago)
Author:
nacin
Message:

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.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/wp-admin/includes/class-wp-upgrader.php

    r25781 r25782  
    13061306                // Not all errors are equal. These codes are critical: copy_failed__copy_dir, 
    13071307                // mkdir_failed__copy_dir, copy_failed__copy_dir_retry, and disk_full. 
    1308                 if ( false !== strpos( $error_code, '__copy_dir' ) ) 
     1308                // do_rollback allows for update_core() to trigger a rollback if needed. 
     1309                if ( false !== strpos( $error_code, 'do_rollback' ) ) 
     1310                    $try_rollback = true; 
     1311                elseif ( false !== strpos( $error_code, '__copy_dir' ) ) 
    13091312                    $try_rollback = true; 
    13101313                elseif ( 'disk_full' === $error_code ) 
Note: See TracChangeset for help on using the changeset viewer.