mirror of
https://github.com/WordPress/WordPress.git
synced 2024-12-22 17:18:32 +01:00
Cron pass-by-reference error fix from robmiller. fixes #2790
git-svn-id: http://svn.automattic.com/wordpress/trunk@3860 1a063a9b-81f0-0310-95a4-ce76da25c4cd
This commit is contained in:
parent
8310e71be6
commit
181119bd1f
@ -65,7 +65,8 @@ function wp_next_scheduled( $hook ) {
|
|||||||
}
|
}
|
||||||
|
|
||||||
function spawn_cron() {
|
function spawn_cron() {
|
||||||
if ( array_shift( array_keys( get_option( 'cron' ) ) ) > time() )
|
$keys = array_keys( get_option( 'cron' ) );
|
||||||
|
if ( array_shift( $keys ) > time() )
|
||||||
return;
|
return;
|
||||||
|
|
||||||
$cron_url = get_settings( 'siteurl' ) . '/wp-cron.php';
|
$cron_url = get_settings( 'siteurl' ) . '/wp-cron.php';
|
||||||
@ -81,7 +82,12 @@ function spawn_cron() {
|
|||||||
|
|
||||||
function wp_cron() {
|
function wp_cron() {
|
||||||
$crons = get_option( 'cron' );
|
$crons = get_option( 'cron' );
|
||||||
if ( !is_array($crons) || array_shift( array_keys( $crons ) ) > time() )
|
|
||||||
|
if ( !is_array($crons) )
|
||||||
|
return;
|
||||||
|
|
||||||
|
$keys = array_keys( $crons );
|
||||||
|
if ( array_shift( $keys ) > time() )
|
||||||
return;
|
return;
|
||||||
|
|
||||||
$schedules = wp_get_schedules();
|
$schedules = wp_get_schedules();
|
||||||
|
Loading…
Reference in New Issue
Block a user