Fix array_keys error when cron option is not an array. Props robmiller. fixes #2814

git-svn-id: https://develop.svn.wordpress.org/trunk@3929 602fd350-edb4-49c9-b593-d223f7449a82
This commit is contained in:
Ryan Boren 2006-06-27 06:04:27 +00:00
parent 23e2a0a25f
commit 87102702e2
1 changed files with 6 additions and 1 deletions

View File

@ -65,7 +65,12 @@ function wp_next_scheduled( $hook ) {
}
function spawn_cron() {
$keys = array_keys( get_option( 'cron' ) );
$crons = get_option( 'cron' )
if( !is_array($crons) )
return;
$keys = array_keys( $crons );
if ( array_shift( $keys ) > time() )
return;