Make WordPress Core

Ticket #33475: 33475.diff

File 33475.diff, 635 bytes (added by wonderboymusic, 9 years ago)
  • src/wp-includes/cron.php

     
    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 ) {