Fix array_keys error when cron option is not an array. Props robmiller. fixes #2814
git-svn-id: http://svn.automattic.com/wordpress/trunk@3929 1a063a9b-81f0-0310-95a4-ce76da25c4cd
This commit is contained in:
parent
ff19f4b5a5
commit
db0b40736a
|
@ -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;
|
||||
|
||||
|
|
Loading…
Reference in New Issue