[wp-trac] [WordPress Trac] #41010: wp_get_object_terms() returns duplicate terms if more than one taxonomy is given in args

WordPress Trac noreply at wordpress.org
Thu Jul 13 13:40:41 UTC 2017


#41010: wp_get_object_terms() returns duplicate terms if more than one taxonomy is
given in args
-------------------------------------------+---------------------------
 Reporter:  mranner                        |       Owner:  boonebgorges
     Type:  defect (bug)                   |      Status:  closed
 Priority:  normal                         |   Milestone:  4.8.1
Component:  Taxonomy                       |     Version:  4.8
 Severity:  normal                         |  Resolution:  fixed
 Keywords:  has-patch dev-feedback commit  |     Focuses:
-------------------------------------------+---------------------------
Changes (by boonebgorges):

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


Comment:

 In [changeset:"41037"]:
 {{{
 #!CommitTicketReference repository="" revision="41037"
 Taxonomy: Avoid duplicates when querying for terms in taxonomies
 registered with `$args` parameter.

 [40514] introduced a bug that caused term queries to return some
 duplicates
 when the `$taxonomies` array contained only taxonomies that were
 originally
 registered with an `$args` array. We fix this bug by ensuring that
 recursive `get_terms()` queries stop when all queried `$taxonomies` have
 already been referenced.

 Props bor0, atanasangelovdev.
 Fixes #41010.
 }}}

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


More information about the wp-trac mailing list