#7925 closed defect (bug) (fixed)
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
Reported by: |
|
Owned by: |
|
---|---|---|---|
Milestone: | 2.7 | Priority: | normal |
Severity: | normal | Version: | |
Component: | General | Keywords: | post_meta |
Focuses: | Cc: |
Description ¶
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.
Pull Requests
- Loading…
Change History (5)
#2
@ Lead Developer
17 years ago
- Milestone changed from 2.8 to 2.7
- Owner changed from anonymous to markjaquith
- Status changed from new to assigned
Thanks for this! I've seen this in action but couldn't figure out what was going on.
Note: See
TracTickets for help on using
tickets.
I guess i needed some practice setting file extensions and attaching files. Please delete all but the last.