[wp-trac] [WordPress Trac] #42691: WP_Term_Query get_terms generates invalid sql queries

WordPress Trac noreply at wordpress.org
Mon Apr 30 21:07:17 UTC 2018


#42691: WP_Term_Query get_terms generates invalid sql queries
--------------------------+---------------------
 Reporter:  GM_Alex       |       Owner:  (none)
     Type:  defect (bug)  |      Status:  new
 Priority:  normal        |   Milestone:  5.0
Component:  Taxonomy      |     Version:  4.9
 Severity:  normal        |  Resolution:
 Keywords:  has-patch     |     Focuses:
--------------------------+---------------------

Comment (by boonebgorges):

 In [changeset:"43049" 43049]:
 {{{
 #!CommitTicketReference repository="" revision="43049"
 Taxonomy: Ensure that invalid term objects are discarded in
 `WP_Term_Query`.

 The `get_term()` mapping may result in term objects that are `null` or
 `WP_Error` when plugins use `get_term` or a related filter. Since `null`
 and error objects are not valid results for a term query, we discard
 them.

 Props GM_Alex.
 See #42691.
 }}}

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


More information about the wp-trac mailing list