WordPress.org

Make WordPress Core

Ticket #23939: 23939.patch

File 23939.patch, 446 bytes (added by ocean90, 13 months ago)
  • wp-admin/includes/ajax-actions.php

     
    728728        if ( ! $post ) 
    729729                wp_die( -1 ); 
    730730 
    731         if ( !current_user_can( 'edit_post', $comment_post_ID ) ) 
     731        if ( ! current_user_can( 'edit_post', $post->ID ) ) 
    732732                wp_die( -1 ); 
    733733 
    734734        if ( empty( $post->post_status ) )