[wp-trac] [WordPress Trac] #36878: get_term_by returns random result with multiple terms

WordPress Trac noreply at wordpress.org
Wed Jun 8 04:07:49 UTC 2016


#36878: get_term_by returns random result with multiple terms
--------------------------+---------------------------
 Reporter:  cogmios       |       Owner:  boonebgorges
     Type:  defect (bug)  |      Status:  closed
 Priority:  normal        |   Milestone:  4.6
Component:  Taxonomy      |     Version:  4.5.2
 Severity:  normal        |  Resolution:  fixed
 Keywords:  needs-docs    |     Focuses:  docs
--------------------------+---------------------------
Changes (by boonebgorges):

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


Comment:

 In [changeset:"37656"]:
 {{{
 #!CommitTicketReference repository="" revision="37656"
 Add a note about uniqueness to the doc block for `get_term_by()`.

 `get_term_by()` always returns a single term, even when more than one term
 matches the query parameters. The new note warns developers to use
 `get_terms()` when such ambiguity may result.

 Fixes #36878.
 }}}

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


More information about the wp-trac mailing list