WordPress.org

Make WordPress Core

Opened 3 years ago

Closed 3 years ago

Last modified 3 years ago

#16573 closed defect (bug) (duplicate)

meta_query doesnt support "empty" values

Reported by: 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)

comment:1 dd323 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

comment:2 scribu3 years ago

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

comment:3 scribu3 years ago

I meant to post this comment on #16735.

Note: See TracTickets for help on using tickets.