[wp-trac] [WordPress Trac] #48943: `comment_form()` expects optional "email" field to be passed.

WordPress Trac noreply at wordpress.org
Wed Dec 11 20:56:06 UTC 2019


#48943: `comment_form()` expects optional "email" field to be passed.
--------------------------+-----------------------------
 Reporter:  Mat Lipe      |      Owner:  (none)
     Type:  defect (bug)  |     Status:  new
 Priority:  normal        |  Milestone:  Awaiting Review
Component:  Comments      |    Version:  5.3
 Severity:  normal        |   Keywords:  has-patch
  Focuses:  template      |
--------------------------+-----------------------------
 Ticket [#47975](https://core.trac.wordpress.org/ticket/47975) introduced a
 requirement to the `comment_form` template tag of a passed
 `field['email']` argument.

 When using `comment_form` without passing `field['email']` to the `$args`
 parameter you get the following notice level error.

 {{{
 Undefined index: email
 \wp-includes\comment-template.php:2440
 }}}

 I have confirmed the issue does not exist on WP 5.2.4.

 I have included a patch which simply checks for the existence of the
 `email` array key before using it.

-- 
Ticket URL: <https://core.trac.wordpress.org/ticket/48943>
WordPress Trac <https://core.trac.wordpress.org/>
WordPress publishing platform


More information about the wp-trac mailing list