[wp-trac] [WordPress Trac] #34997: preprocess_comment filter does not contain old user_ID field for user_id, instead it has new user_id field

WordPress Trac noreply at wordpress.org
Mon Jan 11 02:34:36 UTC 2016


#34997: preprocess_comment filter does not contain old user_ID field for user_id,
instead it has new user_id field
--------------------------+--------------------------
 Reporter:  cookiesowns   |       Owner:  johnbillion
     Type:  defect (bug)  |      Status:  closed
 Priority:  normal        |   Milestone:  4.4.1
Component:  Comments      |     Version:  4.4
 Severity:  normal        |  Resolution:  fixed
 Keywords:  fixed-major   |     Focuses:
--------------------------+--------------------------
Changes (by johnbillion):

 * status:  reopened => closed
 * resolution:   => fixed


Comment:

 Replying to [comment:12 cookiesowns]:
 > I see in your test, you're looking for both user_ID and user_id. However
 in the patch for comment.php, you've changed user_id, back to user_ID.
 >
 > Shouldn't this break the test?

 The `wp_new_comment()` function
 [https://core.trac.wordpress.org/browser/tags/4.4.1/src/wp-
 includes/comment.php?marks=1667,1668,1669#L1664 populates the `user_id`
 element when `user_ID` is passed]. Hence, both elements are present in the
 `$commentdata` array which gets passed to the `preprocess_comment` filter.

--
Ticket URL: <https://core.trac.wordpress.org/ticket/34997#comment:13>
WordPress Trac <https://core.trac.wordpress.org/>
WordPress publishing platform


More information about the wp-trac mailing list