Make WordPress Core

Opened 13 years ago

Closed 13 years ago

Last modified 13 years ago

#16573 closed defect (bug) (duplicate)

meta_query doesnt support "empty" values

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

Description

Basically, a meta_value of '0' is ignored in meta queries, It bases it on empty(), so a meta value being "empty" is ignored.

This mainly comes into play for numeric comparisons, ie. field >= 0 (do not want -50 etc)

Code: Line 423 change from empty() to strlen()?

Core includes a hack to work around this already

Change History (3)

#1 @dd32
13 years ago

  • Milestone Future Release deleted
  • Resolution set to duplicate
  • Status changed from new to closed

of course it was reported 4 months ago.. #15292

#2 @scribu
13 years ago

Not quite the same thing, but I'll run with it.

#3 @scribu
13 years ago

I meant to post this comment on #16735.

Note: See TracTickets for help on using tickets.