[wp-trac] [WordPress Trac] #35624: Use of get_comment() function shows Notice

WordPress Trac noreply at wordpress.org
Fri Feb 5 18:26:31 UTC 2016


#35624: Use of get_comment() function shows Notice
--------------------------+--------------------
 Reporter:  WisdmLabs     |       Owner:
     Type:  defect (bug)  |      Status:  new
 Priority:  normal        |   Milestone:  4.4.3
Component:  Comments      |     Version:  4.4
 Severity:  normal        |  Resolution:
 Keywords:  has-patch     |     Focuses:
--------------------------+--------------------
Changes (by boonebgorges):

 * keywords:   => has-patch
 * version:  4.4.1 => 4.4
 * milestone:  Awaiting Review => 4.4.3


Comment:

 After a bit of banging my head on the desk, I figured out what's going on
 here.

 [33963] was part of an effort to stop using `global $comment` to fetch the
 current comment, in favor of `get_comment()`. In the case of
 `comment_form_title()`, this change broke what was previous a funny
 "feature', where the line `$comment = get_comment($replytoid);` would
 assign that comment to the `$comment` global. I would have to look at the
 history, but I assume that this was intentional, as it allows comment
 template tags to be used in the reply form.

 As such, I believe that restoring the previous behavior will fix all of
 the issues described above. See [attachment:35624.diff]. Can I get
 verification from others?

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


More information about the wp-trac mailing list