Opened 8 years ago
Last modified 8 years ago
#46347 new defect (bug)
WP_Term_Query where sql_clauses oddity
| Reported by: | vrandom | Owned by: | |
|---|---|---|---|
| Priority: | normal | Milestone: | Awaiting Review |
| Component: | Query | Version: | |
| Severity: | normal | Keywords: | |
| Cc: | Focuses: |
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 sub array value found and ignores all the other keys.
Shouldn't this be:
$where = implode( ' AND ', array_values($this->sql_clauses['where']));
so that all array elements are included in the where?
Note:
See TracTickets
for help on using tickets.
![(please configure the [header_logo] section in trac.ini)](/chrome/site/your_project_logo.png)