WordPress.org

Make WordPress Core

Ticket #11849: 11849.patch

File 11849.patch, 659 bytes (added by hakre, 4 years ago)
  • wp-admin/admin-ajax.php

    ### Eclipse Workspace Patch 1.0
    #P wordpress-trunk
     
    200200        $x->send(); 
    201201} 
    202202 
    203 $id = isset($_POST['id'])? (int) $_POST['id'] : 0; 
    204 switch ( $action = $_POST['action'] ) : 
     203$id     = isset($_POST['id'])     ? (int) $_POST['id'] : 0; 
     204$action = isset($_POST['action']) ? $_POST['action']   : '';  
     205switch ( $action ) : 
    205206case 'delete-comment' : // On success, die with time() instead of 1 
    206207        if ( !$comment = get_comment( $id ) ) 
    207208                die( (string) time() );