WordPress.org

Make WordPress Core


Ignore:
Timestamp:
08/19/2015 11:36:06 AM (3 years ago)
Author:
dd32
Message:

Term Splitting: Fix a reversal of parameters to wp_schedule_single_event() introduced in [33621].
The existing invalid cron entries will not be purged automatically (as the 'timestamp' is never matched) so we do this ourselves.

Merges [33646] to the 4.3 branch.
Props mechter for noticing!
See #30261.
Fixes #33423 for the 4.3 branch.

Location:
branches/4.3
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • branches/4.3

  • branches/4.3/src/wp-admin/includes/upgrade.php

    r33627 r33647  
    534534    if ( $wp_current_db_version < 33055 )
    535535        upgrade_430();
     536
     537    if ( $wp_current_db_version < 33056 )
     538        upgrade_431();
    536539
    537540    maybe_disable_link_manager();
     
    15791582
    15801583/**
     1584 * Executes changes made in WordPress 4.3.1.
     1585 *
     1586 * @since 4.3.1
     1587 */
     1588function upgrade_431() {
     1589    // Fix incorrect cron entries for term splitting
     1590    $cron_array = _get_cron_array();
     1591    if ( isset( $cron_array['wp_batch_split_terms'] ) ) {
     1592        foreach ( $cron_array['wp_batch_split_terms'] as $timestamp_hook => $cron_data ) {
     1593            foreach ( $cron_data as $key => $args ) {
     1594                wp_unschedule_event( 'wp_batch_split_terms', $timestamp_hook, $args['args'] );
     1595            }
     1596        }
     1597    }
     1598}
     1599
     1600/**
    15811601 * Executes network-level upgrade routines.
    15821602 *
Note: See TracChangeset for help on using the changeset viewer.