[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:42:46 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:
-------------------------------------------+---------------------------

Comment (by boonebgorges):

 In [changeset:"41038"]:
 {{{
 #!CommitTicketReference repository="" revision="41038"
 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.

 Ports [41037] to the 4.8 branch.

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

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


More information about the wp-trac mailing list