wp_cron() array warning fix ups from Owen. fixes #2436
git-svn-id: http://svn.automattic.com/wordpress/trunk@3522 1a063a9b-81f0-0310-95a4-ce76da25c4cd
This commit is contained in:
parent
c2f5986b03
commit
373424383e
|
@ -2357,11 +2357,10 @@ function spawn_cron() {
|
||||||
}
|
}
|
||||||
|
|
||||||
function wp_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;
|
return;
|
||||||
|
|
||||||
$crons = get_option('cron');
|
|
||||||
$newcrons = $crons;
|
|
||||||
foreach ($crons as $timestamp => $cronhooks) {
|
foreach ($crons as $timestamp => $cronhooks) {
|
||||||
if ($timestamp > time()) break;
|
if ($timestamp > time()) break;
|
||||||
foreach($cronhooks as $hook => $args) {
|
foreach($cronhooks as $hook => $args) {
|
||||||
|
|
Loading…
Reference in New Issue