From 87102702e2f0479804357f7198f74757d33392c2 Mon Sep 17 00:00:00 2001 From: Ryan Boren Date: Tue, 27 Jun 2006 06:04:27 +0000 Subject: [PATCH] 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 --- wp-includes/cron.php | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/wp-includes/cron.php b/wp-includes/cron.php index d1ce846fb6..3a9d31dd82 100644 --- a/wp-includes/cron.php +++ b/wp-includes/cron.php @@ -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;