diff --git a/wp-includes/cron.php b/wp-includes/cron.php index 1666a09b27..18fe14196e 100644 --- a/wp-includes/cron.php +++ b/wp-includes/cron.php @@ -302,6 +302,10 @@ function wp_schedule_event( $timestamp, $recurrence, $hook, $args = array(), $wp $key = md5( serialize( $event->args ) ); $crons = _get_cron_array(); + if ( ! is_array( $crons ) ) { + $crons = array(); + } + $crons[ $event->timestamp ][ $event->hook ][ $key ] = array( 'schedule' => $event->schedule, 'args' => $event->args, @@ -1125,8 +1129,7 @@ function wp_get_ready_cron_jobs() { } $crons = _get_cron_array(); - - if ( false === $crons ) { + if ( ! is_array( $crons ) ) { return array(); } diff --git a/wp-includes/version.php b/wp-includes/version.php index 465e82c1a8..8dbc24083f 100644 --- a/wp-includes/version.php +++ b/wp-includes/version.php @@ -13,7 +13,7 @@ * * @global string $wp_version */ -$wp_version = '5.9-alpha-51618'; +$wp_version = '5.9-alpha-51619'; /** * Holds the WordPress DB revision, increments when changes are made to the WordPress DB schema.