Opened 3 years ago
Closed 2 years ago
#60475 closed defect (bug) (fixed)
Possible incorrect type for $comment_id in get_comment_author filter
| Reported by: | david.binda | Owned by: | SergeyBiryukov |
|---|---|---|---|
| Priority: | normal | Milestone: | 6.6 |
| Component: | Comments | Version: | 6.0 |
| Severity: | normal | Keywords: | has-patch |
| Cc: | Focuses: |
Description
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 https://core.trac.wordpress.org/ticket/54379#comment:8 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)
Change History (4)
Note:
See TracTickets
for help on using tickets.
![(please configure the [header_logo] section in trac.ini)](/chrome/site/your_project_logo.png)
In 58335: