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

WordPress Trac noreply at wordpress.org
Wed Dec 11 21:07:03 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        |  Resolution:
 Keywords:  has-patch     |     Focuses:  template
--------------------------+------------------------------
Description changed by SergeyBiryukov:

Old description:

> 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.

New description:

 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#comment:2>
WordPress Trac <https://core.trac.wordpress.org/>
WordPress publishing platform


More information about the wp-trac mailing list