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

WordPress Trac noreply at wordpress.org
Tue May 1 01:14:42 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:  4.9.7
Component:  Taxonomy      |     Version:  4.9
 Severity:  normal        |  Resolution:
 Keywords:  has-patch     |     Focuses:
--------------------------+---------------------

Comment (by boonebgorges):

 Sorry, I was mistaken in my previous comment. The `populate_terms()` check
 also accounts for the fact that `get_term()` can return `WP_Error`
 objects. This can't easily be compressed into a `array_filter()` call,
 unless we have a function that checks for non-emptiness as well as non-
 WP_Error-ness.

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


More information about the wp-trac mailing list