[wp-trac] [WordPress Trac] #51263: PHP warning when editing comments in the administration comment edit screen

WordPress Trac noreply at wordpress.org
Tue Sep 8 05:13:18 UTC 2020


#51263: PHP warning when editing comments in the administration comment edit screen
-----------------------------------------------+---------------------------
 Reporter:  regan.khadgi                       |       Owner:  (none)
     Type:  defect (bug)                       |      Status:  new
 Priority:  normal                             |   Milestone:  Awaiting
                                               |  Review
Component:  Comments                           |     Version:  5.5.1
 Severity:  normal                             |  Resolution:
 Keywords:  has-screenshots reporter-feedback  |     Focuses:
                                               |  administration
-----------------------------------------------+---------------------------

Comment (by regan.khadgi):

 Hello there,

 I just debugged a bit more and it seems there is some issue with $_GET and
 $_POST. When I inspected in the comment edit form there is a input type
 hidden field with name as c which shall be addressed as
 {{{
 $_POST['c']
 }}}
  on the receiving end but when I checked in the comment.php file in exact
 line number then it is being addressed as

 {{{
 $_GET['c']
 }}}

 without checking isset or empty condition.

 Please check these screenshot.
 [https://prntscr.com/udeaqu]
 [http://prntscr.com/udecmn]

 So probable solution might be using $_REQUEST instead of $_GET or $_POST
 as since same screen is being used to submit and display the comment edit
 form.

-- 
Ticket URL: <https://core.trac.wordpress.org/ticket/51263#comment:3>
WordPress Trac <https://core.trac.wordpress.org/>
WordPress publishing platform


More information about the wp-trac mailing list