Make WordPress Core

Changeset 10969


Ignore:
Timestamp:
04/17/2009 12:23:48 AM (16 years ago)
Author:
ryan
Message:

Fix handling of old timestamps in wp_reschedule_event(). Props natethelen. fixes #9318

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/wp-includes/cron.php

    r10898 r10969  
    8989        return false;
    9090
    91     while ( $timestamp < time() + 1 )
    92         $timestamp += $interval;
     91    $now = time();
     92
     93    if ( $timestamp >= $now )
     94        $timestamp = $now + $interval;
     95    else
     96        $timestamp = $now + ($interval - (($now - $timestamp) % $interval));
    9397
    9498    wp_schedule_event( $timestamp, $recurrence, $hook, $args );
Note: See TracChangeset for help on using the changeset viewer.