From daa01c703b4e4d353f32e10749b2e5881634df87 Mon Sep 17 00:00:00 2001 From: Scott Taylor Date: Sat, 26 Sep 2015 04:50:06 +0000 Subject: [PATCH] Cron: In `spawn_cron()`, when using `ALTERNATE_WP_CRON`, return early for any non-`GET`, instead of naively checking `! empty( $_POST )`. Props johnbillion, markoheijnen. Fixes #27447. git-svn-id: https://develop.svn.wordpress.org/trunk@34576 602fd350-edb4-49c9-b593-d223f7449a82 --- src/wp-includes/cron.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/wp-includes/cron.php b/src/wp-includes/cron.php index b6daeffc74..60492c5d04 100644 --- a/src/wp-includes/cron.php +++ b/src/wp-includes/cron.php @@ -269,7 +269,7 @@ function spawn_cron( $gmt_time = 0 ) { return; if ( defined( 'ALTERNATE_WP_CRON' ) && ALTERNATE_WP_CRON ) { - if ( ! empty( $_POST ) || defined( 'DOING_AJAX' ) || defined( 'XMLRPC_REQUEST' ) ) { + if ( 'GET' !== $_SERVER['REQUEST_METHOD'] || defined( 'DOING_AJAX' ) || defined( 'XMLRPC_REQUEST' ) ) { return; }