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:
parent
23e2a0a25f
commit
87102702e2
@ -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
Block a user