[wp-trac] [WordPress Trac] #7925: update_post_meta() and
delete_post_meta() not using wp_is_post_revision() on $post_id,
resulting in multiple meta rows and incorrect return values
WordPress Trac
wp-trac at lists.automattic.com
Mon Oct 20 03:42:02 GMT 2008
#7925: update_post_meta() and delete_post_meta() not using wp_is_post_revision()
on $post_id, resulting in multiple meta rows and incorrect return values
--------------------------+-------------------------------------------------
Reporter: misterbisson | Owner: anonymous
Type: defect | Status: new
Priority: normal | Milestone: 2.8
Component: General | Version:
Severity: normal | Keywords: post_meta
--------------------------+-------------------------------------------------
add_post_meta() uses the following block of code to make sure the passed
$post_id is a real post, not a revision:
`
// make sure meta is added to the post, not a revision
if ( $the_post = wp_is_post_revision($post_id) )
$post_id = $the_post;
`
However, update_post_meta() and delete_post_meta() do not do that. The bug
is present in trunk.
--
Ticket URL: <http://trac.wordpress.org/ticket/7925>
WordPress Trac <http://trac.wordpress.org/>
WordPress blogging software
More information about the wp-trac
mailing list