[wp-trac] [WordPress Trac] #35462: update_term_cache and deleting object_id

WordPress Trac noreply at wordpress.org
Fri Jan 15 19:34:18 UTC 2016


#35462: update_term_cache and deleting object_id
--------------------------+---------------------------
 Reporter:  berengerzyla  |       Owner:  boonebgorges
     Type:  defect (bug)  |      Status:  closed
 Priority:  normal        |   Milestone:  4.4.2
Component:  Taxonomy      |     Version:  4.4
 Severity:  normal        |  Resolution:  fixed
 Keywords:                |     Focuses:
--------------------------+---------------------------
Changes (by boonebgorges):

 * owner:   => boonebgorges
 * status:  new => closed
 * resolution:   => fixed


Comment:

 In [changeset:"36323"]:
 {{{
 #!CommitTicketReference repository="" revision="36323"
 Populate term cache with proper clone of term objects.

 [34999] modified the cache strategy for terms in the context of
 `wp_get_object_terms()`. As part of these changes, the `object_id`
 property of
 term objects had to be unset before being cached. To avoid modifying
 passed-by-
 reference terms, `update_term_cache()` attempted to make a copy of the
 terms
 passed to the function; however, it failed to use the `clone` keyword, and
 thus
 only created a reference instead of a copy.

 Props berengerzyla.
 Fixes #35462.
 }}}

--
Ticket URL: <https://core.trac.wordpress.org/ticket/35462#comment:4>
WordPress Trac <https://core.trac.wordpress.org/>
WordPress publishing platform


More information about the wp-trac mailing list