Make WordPress Core

Opened 14 years ago

Closed 14 years ago

Last modified 14 years ago

#16796 closed defect (bug) (duplicate)

_parse_meta_query with value 0

Reported by: ptietz's profile ptietz Owned by:
Milestone: Priority: normal
Severity: normal Version: 3.1
Component: Query Keywords: needs-patch
Focuses: Cc:

Description

Hey, guys.

i found this when writing a hotel search, where you can search by stars, which is actually a custom field.

So I created a little search script using WP_Query, which is now supporting "meta_query" since WP 3.1.

But if there are 0 stars set, the meta_value is ignored.
This is because of what's happening in meta.php on line 461, where the actual value "0" fails the !empty() condition.

Hope, this helps. Greetings from Germany!

(PS: This is my first bug report, so please excuse me, if I have done something wrong)

Change History (2)

#1 in reply to: ↑ description @duck_
14 years ago

  • Milestone Awaiting Review deleted
  • Resolution set to duplicate
  • Status changed from new to closed

Replying to ptietz:

(PS: This is my first bug report, so please excuse me, if I have done something wrong)

Report is good, but it has been reported a few times already. Thanks though.

#16573, #16735, #15292

#2 @ptietz
14 years ago

okay, searched for the wrong term >.<

Note: See TracTickets for help on using tickets.