mirror of
https://github.com/gosticks/wordpress-develop.git
synced 2026-06-28 14:20:15 +00:00
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:
@@ -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;
|
||||
|
||||
|
||||
Reference in New Issue
Block a user