From 953064226ab4663845fefec11d8fabf147436b48 Mon Sep 17 00:00:00 2001 From: Ryan Boren Date: Mon, 13 Feb 2006 05:30:44 +0000 Subject: [PATCH] wp_cron() array warning fix ups from Owen. fixes #2436 git-svn-id: https://develop.svn.wordpress.org/trunk@3522 602fd350-edb4-49c9-b593-d223f7449a82 --- wp-includes/functions.php | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/wp-includes/functions.php b/wp-includes/functions.php index dd23ed502a..acc47336f1 100644 --- a/wp-includes/functions.php +++ b/wp-includes/functions.php @@ -2357,11 +2357,10 @@ function spawn_cron() { } function wp_cron() { - if (array_shift(array_keys(get_option('cron'))) > time()) + $crons = get_option('cron'); + if (!is_array($crons) || array_shift(array_keys($crons)) > time()) return; - $crons = get_option('cron'); - $newcrons = $crons; foreach ($crons as $timestamp => $cronhooks) { if ($timestamp > time()) break; foreach($cronhooks as $hook => $args) {