[wp-trac] [WordPress Trac] #35624: Use of get_comment() function shows Notice
WordPress Trac
noreply at wordpress.org
Fri Feb 5 18:59:01 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:
--------------------------+--------------------
Comment (by d4z_c0nf):
Thanks @boonebgorges I see what you mean.
So this way, when a {{{$replytoid}}} exists, you overwrite (well you set
it) the global {{{$comment}}}.
Isn't this a little weird? I mean a function which should just return a
string also changes a global variable?
I still think that since you already have the comment id
({{{$replytoid}}}) there's no sense to retrieve it again with
{{{get_comment_ID()}}}. But most likely there's something I don't know ;)
Thanks for looking into it. :)
--
Ticket URL: <https://core.trac.wordpress.org/ticket/35624#comment:7>
WordPress Trac <https://core.trac.wordpress.org/>
WordPress publishing platform
More information about the wp-trac
mailing list