[wp-trac] [WordPress Trac] #54379: `get_comment_ID()` can cause a notice within the `comment_text` filter
WordPress Trac
noreply at wordpress.org
Thu Mar 3 02:05:12 UTC 2022
#54379: `get_comment_ID()` can cause a notice within the `comment_text` filter
--------------------------+----------------------------
Reporter: dd32 | Owner: davidbaumwald
Type: defect (bug) | Status: reviewing
Priority: normal | Milestone: 6.0
Component: Comments | Version:
Severity: normal | Resolution:
Keywords: has-patch | Focuses:
--------------------------+----------------------------
Comment (by dd32):
Replying to [comment:6 davidbaumwald]:
> More importantly, the inline docs there were updated to have the
`$comment_ID` param to expect a `string`. Should this be corrected back
to `int` while also casting the `$comment_ID` to an `(int)`?
While I don't agree with the whole `A numeric string, for compatibility
reasons.` stuff, I don't see any benefit in casting to an int here, might
as well just continue the status-quo of a numeric string.
> Is it your preference to handle the other related notices here as well,
or should those be split off into separate tickets?
I don't see the harm in fixing multiple similar things in a singular
ticket. I'd just manually apply the diff if I was committing this.. but
happy to refresh it for you.
Looks like [attachment:"54379.comments_open.diff"] was handled in [52223].
https://github.com/WordPress/wordpress-develop/pull/2373 should be the
remaining diffs from the attachments here.
--
Ticket URL: <https://core.trac.wordpress.org/ticket/54379#comment:8>
WordPress Trac <https://core.trac.wordpress.org/>
WordPress publishing platform
More information about the wp-trac
mailing list