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

WordPress Trac noreply at wordpress.org
Tue Jul 17 16:27:15 UTC 2018


#42691: WP_Term_Query get_terms generates invalid sql queries
-----------------------------------+-----------------------------
 Reporter:  GM_Alex                |       Owner:  SergeyBiryukov
     Type:  defect (bug)           |      Status:  closed
 Priority:  normal                 |   Milestone:  4.9.8
Component:  Taxonomy               |     Version:  4.9
 Severity:  normal                 |  Resolution:  fixed
 Keywords:  has-patch fixed-major  |     Focuses:
-----------------------------------+-----------------------------
Changes (by SergeyBiryukov):

 * owner:  (none) => SergeyBiryukov
 * status:  new => closed
 * resolution:   => fixed


Comment:

 In [changeset:"43492" 43492]:
 {{{
 #!CommitTicketReference repository="" revision="43492"
 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.
 Merges [43049] and [43491] to the 4.9 branch.
 Fixes #42691.
 }}}

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


More information about the wp-trac mailing list