[wp-trac] [WordPress Trac] #60475: Possible incorrect type for $comment_id in get_comment_author filter
WordPress Trac
noreply at wordpress.org
Tue Jun 4 15:28:14 UTC 2024
#60475: Possible incorrect type for $comment_id in get_comment_author filter
--------------------------+-----------------------------
Reporter: david.binda | Owner: SergeyBiryukov
Type: defect (bug) | Status: closed
Priority: normal | Milestone: 6.6
Component: Comments | Version: 6.0
Severity: normal | Resolution: fixed
Keywords: has-patch | Focuses:
--------------------------+-----------------------------
Changes (by SergeyBiryukov):
* owner: (none) => SergeyBiryukov
* status: new => closed
* resolution: => fixed
Comment:
In [changeset:"58335" 58335]:
{{{
#!CommitTicketReference repository="" revision="58335"
Comments: Ensure the correct comment ID type is passed to
`get_comment_author`.
The `$comment_id` parameter of the `get_comment_author` filter is
documented as a numeric string, however in case a non-existing comment ID
is passed to the `get_comment_author()` function, it could be an integer
instead.
This commit resolves the issue and adds a PHPUnit test demonstrating the
behavior.
Includes updating `get_comment_author_url()` unit tests for consistency.
Follow-up to [41127], [52818].
Props david.binda.
Fixes #60475.
}}}
--
Ticket URL: <https://core.trac.wordpress.org/ticket/60475#comment:3>
WordPress Trac <https://core.trac.wordpress.org/>
WordPress publishing platform
More information about the wp-trac
mailing list