Make WordPress Core

Opened 3 months ago

Last modified 3 months ago

#60475 new defect (bug)

Possible incorrect type for $comment_id in get_comment_author filter

Reported by: davidbinda's profile david.binda Owned by:
Milestone: Awaiting Review Priority: normal
Severity: normal Version: 6.0
Component: Comments Keywords: has-patch
Focuses: Cc:


After r52818 the $comment_id param of the get_comment_author filter, which is documented as numeric string, may be an int, in case a non-existing comment ID is passed to the get_comment_author function.

The topic has been briefly discussed in mentioning that the numeric string type is here for compatibility.

I'm attaching a patch containing a fix for the issue, as well as a PHPUnit test demonstrating the behaviour.

Attachments (1)

60475.diff (3.3 KB) - added by david.binda 3 months ago.

Download all attachments as: .zip

Change History (2)

3 months ago

#1 @Presskopp
3 months ago

  • Keywords has-patch added
Note: See TracTickets for help on using tickets.