Make WordPress Core

Ticket #33475: 33475_1.patch

File 33475_1.patch, 578 bytes (added by utkarshpatel, 9 years ago)

Added comment

  • wp-includes/cron.php

    diff --git wp-includes/cron.php wp-includes/cron.php
    index 8b88c12..5f4946e 100644
     
    2121 * @return void|false
    2222 */
    2323function wp_schedule_single_event( $timestamp, $hook, $args = array()) {
     24        // check timestamp positive number
     25        if ( ! is_numeric( $timestamp ) || $timestamp <= 0 ){
     26                return ;
     27        }
     28
    2429        // don't schedule a duplicate if there's already an identical event due within 10 minutes of it
    2530        $next = wp_next_scheduled($hook, $args);
    2631        if ( $next && abs( $next - $timestamp ) <= 10 * MINUTE_IN_SECONDS ) {