Make WordPress Core


Ignore:
Timestamp:
06/10/2006 08:43:49 PM (18 years ago)
Author:
ryan
Message:

Cron pass-by-reference error fix from robmiller. fixes #2790

File:
1 edited

Legend:

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

    r3697 r3860  
    6666
    6767function spawn_cron() {
    68     if ( array_shift( array_keys( get_option( 'cron' ) ) ) > time() )
     68    $keys = array_keys( get_option( 'cron' ) );
     69    if ( array_shift( $keys ) > time() )
    6970        return;
    7071
     
    8283function wp_cron() {
    8384    $crons = get_option( 'cron' );
    84     if ( !is_array($crons) || array_shift( array_keys( $crons ) ) > time() )
     85   
     86    if ( !is_array($crons) )
     87        return;
     88
     89    $keys = array_keys( $crons );
     90    if ( array_shift( $keys ) > time() )
    8591        return;
    8692
Note: See TracChangeset for help on using the changeset viewer.