Make WordPress Core

Opened 18 years ago

Closed 17 years ago

#3943 closed defect (bug) (fixed)

emptiness check fails in query.php

Reported by: nbachiyski's profile nbachiyski Owned by:
Milestone: 2.5 Priority: normal
Severity: normal Version: 2.2
Component: General Keywords: has-patch
Focuses: Cc:

Description

'Problem':

If an array is passed to wp-includes/query.php, the $query variable is never empty, because the array is no empty. However there are a lot of empty($query) check further in that function.

Solution':

We construct the query out of the non-empty keys of the array.

Attachments (1)

array-query.diff (667 bytes) - added by nbachiyski 18 years ago.

Download all attachments as: .zip

Change History (5)

#1 @foolswisdom
18 years ago

  • Version set to 2.2

#2 @foolswisdom
18 years ago

  • Milestone changed from 2.2 to 2.3

#3 @markjaquith
17 years ago

  • Milestone changed from 2.3 to 2.4 (next)

Punting.

#4 @westi
17 years ago

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

I believe the current code in query.php fixes this as it does a check at the top on not empty and looks at arrays.

Please re-open if I am wrong.

Note: See TracTickets for help on using tickets.