[wp-trac] [WordPress Trac] #45121: wp_update_post() can modify post tag
WordPress Trac
noreply at wordpress.org
Tue Jan 8 18:55:38 UTC 2019
#45121: wp_update_post() can modify post tag
-------------------------------+------------------------------
Reporter: kaggdesign | Owner: (none)
Type: defect (bug) | Status: new
Priority: normal | Milestone: Awaiting Review
Component: Posts, Post Types | Version: 4.9.8
Severity: normal | Resolution:
Keywords: | Focuses:
-------------------------------+------------------------------
Comment (by kaggdesign):
If several tags with same name exist, and post has one of such tags, then
`wp_update_post()` will modify tag assigned to post.
This is caused by `$post = get_post($postarr['ID'], ARRAY_A);` in
`wp_update_post()`, which returns `'tags_input'` as strings, not ids.
We fix the issue by adding conversion of strings in `'tags_input'` to ids.
)
--
Ticket URL: <https://core.trac.wordpress.org/ticket/45121#comment:3>
WordPress Trac <https://core.trac.wordpress.org/>
WordPress publishing platform
More information about the wp-trac
mailing list