Make WordPress Core

Ticket #51439: 51439-edit-form-comment.php.patch

File 51439-edit-form-comment.php.patch, 739 bytes (added by ravipatel, 4 years ago)

$comment & $action not defined edit-form-comment.php

  • src/wp-admin/edit-form-comment.php

     
    44 *
    55 * @package WordPress
    66 * @subpackage Administration
     7 *
     8 * @global string $action
    79 */
    810
     11global $action;
     12
    913// Don't load directly.
    1014if ( ! defined( 'ABSPATH' ) ) {
    1115        die( '-1' );
    1216}
     17
     18if ( isset( $_REQUEST['c'] ) ) {
     19    $comment_id = absint( $_REQUEST['c'] );
     20    $comment    = get_comment( $comment_id );
     21} else {
     22    $comment = null;
     23}
     24
    1325?>
    1426<form name="post" action="comment.php" method="post" id="post">
    1527<?php wp_nonce_field( 'update-comment_' . $comment->comment_ID ); ?>