Make WordPress Core


Ignore:
Timestamp:
06/04/2024 03:27:57 PM (20 months ago)
Author:
SergeyBiryukov
Message:

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.

File:
1 edited

Legend:

Unmodified
Added
Removed
Note: See TracChangeset for help on using the changeset viewer.