[wp-trac] [WordPress Trac] #45121: wp_update_post() can modify post tag

WordPress Trac noreply at wordpress.org
Wed Feb 19 03:50:51 UTC 2020

#45121: wp_update_post() can modify post tag
 Reporter:  kaggdesign                       |       Owner:  SergeyBiryukov
     Type:  defect (bug)                     |      Status:  closed
 Priority:  normal                           |   Milestone:  5.4
Component:  Posts, Post Types                |     Version:  4.9.8
 Severity:  normal                           |  Resolution:  fixed
 Keywords:  has-patch has-unit-tests commit  |     Focuses:
Changes (by SergeyBiryukov):

 * status:  reviewing => closed
 * resolution:   => fixed


 In [changeset:"47317" 47317]:
 #!CommitTicketReference repository="" revision="47317"
 Posts, Post Types: Discard `tags_input` parameter in `wp_update_post()` if
 it's the same as existing post tags.

 This ensures that `wp_update_post()` does not unintentionally modify post
 tags if the post has several tags with the same name but different slugs.

 Tags should only be modified if `tags_input` parameter was explicitly
 provided, and is different from the existing tags.

 Props kaggdesign, SergeyBiryukov.
 Fixes #45121.

Ticket URL: <https://core.trac.wordpress.org/ticket/45121#comment:16>
WordPress Trac <https://core.trac.wordpress.org/>
WordPress publishing platform

More information about the wp-trac mailing list