WordPress.org

Make WordPress Core

Ticket #12122: 12122.2.diff

File 12122.2.diff, 712 bytes (added by sivel, 8 years ago)

Same as before but adds an additional isset

  • wp-admin/admin-ajax.php

     
    1414define('DOING_AJAX', true);
    1515define('WP_ADMIN', true);
    1616
     17if ( ! isset( $_REQUEST['action'] ) )
     18        die('-1');
     19
    1720require_once('../wp-load.php');
    1821require_once('includes/admin.php');
    1922@header('Content-Type: text/html; charset=' . get_option('blog_charset'));
     
    2225
    2326if ( ! is_user_logged_in() ) {
    2427
    25         if ( $_POST['action'] == 'autosave' ) {
     28        if ( isset( $_POST['action'] ) && $_POST['action'] == 'autosave' ) {
    2629                $id = isset($_POST['post_ID'])? (int) $_POST['post_ID'] : 0;
    2730
    2831                if ( ! $id )