mirror of
https://github.com/gosticks/wordpress-develop.git
synced 2026-08-16 23:00:21 +00:00
Cast to array when using foreach(). Props santosj (and thanks for your perseverance!). fixes #2784
git-svn-id: https://develop.svn.wordpress.org/trunk@8572 602fd350-edb4-49c9-b593-d223f7449a82
This commit is contained in:
@@ -110,7 +110,7 @@ function wp_cron() {
|
||||
$schedules = wp_get_schedules();
|
||||
foreach ( $crons as $timestamp => $cronhooks ) {
|
||||
if ( $timestamp > time() ) break;
|
||||
foreach ( $cronhooks as $hook => $args ) {
|
||||
foreach ( (array) $cronhooks as $hook => $args ) {
|
||||
if ( isset($schedules[$hook]['callback']) && !call_user_func( $schedules[$hook]['callback'] ) )
|
||||
continue;
|
||||
spawn_cron();
|
||||
@@ -168,8 +168,8 @@ function _upgrade_cron_array($cron) {
|
||||
|
||||
$new_cron = array();
|
||||
|
||||
foreach ($cron as $timestamp => $hooks) {
|
||||
foreach ( $hooks as $hook => $args ) {
|
||||
foreach ( (array) $cron as $timestamp => $hooks) {
|
||||
foreach ( (array) $hooks as $hook => $args ) {
|
||||
$key = md5(serialize($args['args']));
|
||||
$new_cron[$timestamp][$hook][$key] = $args;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user