WordPress.org

Making WordPress.org

Opened 7 months ago

Closed 7 months ago

Last modified 7 months ago

#4219 closed defect (invalid)

WP_Term_Query where sql_clauses oddity

Reported by: vrandom Owned by:
Milestone: Priority: normal
Component: General Keywords:
Cc:

Description

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
7 months 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 WordPress.org properties, not for the WordPress code itself.

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