Make WordPress Core

Changeset 34576


Ignore:
Timestamp:
09/26/2015 04:50:06 AM (9 years ago)
Author:
wonderboymusic
Message:

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.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/wp-includes/cron.php

    r34044 r34576  
    270270
    271271    if ( defined( 'ALTERNATE_WP_CRON' ) && ALTERNATE_WP_CRON ) {
    272         if ( ! empty( $_POST ) || defined( 'DOING_AJAX' ) ||  defined( 'XMLRPC_REQUEST' ) ) {
     272        if ( 'GET' !== $_SERVER['REQUEST_METHOD'] || defined( 'DOING_AJAX' ) ||  defined( 'XMLRPC_REQUEST' ) ) {
    273273            return;
    274274        }
Note: See TracChangeset for help on using the changeset viewer.