[wp-trac] [WordPress Trac] #12446: "get_comments" transforms post id
WordPress Trac
wp-trac at lists.automattic.com
Mon Mar 1 21:49:33 UTC 2010
#12446: "get_comments" transforms post id
--------------------------+-------------------------------------------------
Reporter: jmabe | Owner:
Type: defect (bug) | Status: new
Priority: normal | Milestone: Unassigned
Component: General | Version:
Severity: normal | Keywords:
--------------------------+-------------------------------------------------
$post_id is being set to
$post_id = absint($post_id)
which would make a negative post id pull comments for the positive post
id. This is problematic if by chance the post_id is set to -1, and you
happen to have that first hello world post in there, it will always pull
that first hello world comment.
Patch attached.
--
Ticket URL: <http://core.trac.wordpress.org/ticket/12446>
WordPress Trac <http://core.trac.wordpress.org/>
WordPress blogging software
More information about the wp-trac
mailing list