Opened 4 years ago
Closed 4 years ago
#9645 closed defect (bug) (fixed)
Misplaced close parentheses in query.php
| Reported by: |
|
Owned by: |
|
|---|---|---|---|
| Priority: | normal | Milestone: | 2.8 |
| Component: | General | Version: | 2.8 |
| Severity: | normal | Keywords: | has-patch |
| Cc: |
Description
There are two places in wp-includes/query.php where we have this:
if ( is_array($ids) && count($ids > 0) ) {
The close parenthesis for count() is misplaced and we probably really want:
if ( is_array($ids) && count($ids) > 0 ) {
These are part of the query handling for category__not_in and tag__not_in.
Patch attached.
Attachments (2)
Change History (4)
coffee2code — 4 years ago
coffee2code — 4 years ago
comment:1
coffee2code — 4 years ago
Attachment 9645.2.diff includes the original patch, plus some slight refactoring of the code around it. All told, it trims 12 lines of code down to 4, and removes 4 single-use temporary variables. The 4 lines are still relatively short and clear in intention.
comment:2
automattor — 4 years ago
- Resolution set to fixed
- Status changed from new to closed
Note: See
TracTickets for help on using
tickets.

Slight refactoring of code around the area affected by the original patch (this includes original patch).