wp_insert_comment should require comment_post_ID
|Reported by:||markoheijnen||Owned by:|
|Component:||Comments||Keywords:||has-patch needs-testing dev-feedback|
Description (last modified by markoheijnen)
At this moment there is no check for example comment_post_ID. Not sure if there are more checks needed. Reason I asked are a few notices on the unit tests caused by WP_UnitTest_Factory_For_Comment. Those comments don't add a post ID what should change.
Currently, if a null comment_post_ID is passed, the comment isn't connected to a post. This can create confusion. Also Unit tests should run with WP_Debug on.
Change History (20)
comment:2 @westonruter — 22 months ago
- Cc weston@… added
- Keywords has-patch added; needs-patch removed
- Keywords needs-refresh added
- Milestone changed from Awaiting Review to Future Release
comment:13 @valendesigns — 2 months ago
- Keywords needs-testing dev-feedback added; needs-refresh removed