Opened 5 years ago

Closed 5 years ago

Last modified 5 years ago

#4219 closed defect (bug) (invalid)

WP_Term_Query where sql_clauses oddity

Reported by: vrandom's profile vrandom Owned by:
Milestone: Priority: normal
Component: General Keywords:


Hello, I was messing around with a customized version of the WP_Term_Query and noticed something odd.

In the function get_terms, there are a lot of places where $this->sql_clauses['where'][somekey] variables are created.

However, on line 643, this code :

$where = implode( ' AND ', $this->sql_clauses['where'] );

only uses the first subvalue found and ignores all the keys.

Shouldn't this be:

$where = implode( ' AND ', array_values($this->sql_clauses['where']));

so that all array elements are included in the where?

Change History (1)

#1 @Otto42
5 years ago

  • Resolution set to invalid
  • Status changed from new to closed

This should be a core ticket, not a meta ticket. Please look in core.Trac and post there if needed. Meta Trac is for properties, not for the WordPress code itself.

Last edited 5 years ago by Otto42 (previous) (diff)
Note: See TracTickets for help on using tickets.