[wp-trac] [WordPress Trac] #23931: wp_insert_comment should require comment_post_ID

WordPress Trac noreply at wordpress.org
Mon Jul 29 00:39:15 UTC 2013


#23931: wp_insert_comment should require comment_post_ID
--------------------------+------------------------------
 Reporter:  markoheijnen  |       Owner:
     Type:  defect (bug)  |      Status:  new
 Priority:  normal        |   Milestone:  Awaiting Review
Component:  Comments      |     Version:
 Severity:  normal        |  Resolution:
 Keywords:  has-patch     |
--------------------------+------------------------------
Changes (by westonruter):

 * cc: weston@… (added)
 * keywords:  needs-patch => has-patch


Comment:

 By refactoring the way that the commentdata is prepared for insertion into
 the DB, it now merges the passed-in data on top of a defaults array that
 includes a comment_post_ID, so there will be no undefined index.

 See first attached patch, or see from branch on GitHub:
 https://github.com/x-team/WordPress/compare/87f9d11...7588a21

--
Ticket URL: <http://core.trac.wordpress.org/ticket/23931#comment:2>
WordPress Trac <http://core.trac.wordpress.org/>
WordPress blogging software


More information about the wp-trac mailing list