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
This commit is contained in:
Scott Taylor 2015-09-26 04:50:06 +00:00
parent 69f20d3c4b
commit daa01c703b

View File

@ -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;
}