Make WordPress Core

Ticket #33475: 33475.patch

File 33475.patch, 584 bytes (added by utkarshpatel, 10 years ago)

Patch #33475

  • wp-includes/cron.php

    diff --git wp-includes/cron.php wp-includes/cron.php
    index 8b88c12..871a0df 100644
     
    2323function wp_schedule_single_event( $timestamp, $hook, $args = array()) {
    2424        // don't schedule a duplicate if there's already an identical event due within 10 minutes of it
    2525        $next = wp_next_scheduled($hook, $args);
    26         if ( $next && abs( $next - $timestamp ) <= 10 * MINUTE_IN_SECONDS ) {
     26        if ( ( ! is_numeric( $timestamp ) || $timestamp <= 0 ) || ( $next && abs( $next - $timestamp ) <= 10 * MINUTE_IN_SECONDS ) ) {
    2727                return;
    2828        }
    2929