[wp-trac] [WordPress Trac] #16573: meta_query doesnt support "empty" values

WordPress Trac wp-trac at lists.automattic.com
Wed Feb 16 01:45:53 UTC 2011


#16573: meta_query doesnt support "empty" values
--------------------------+----------------------------
 Reporter:  dd32          |      Owner:
     Type:  defect (bug)  |     Status:  new
 Priority:  normal        |  Milestone:  Future Release
Component:  Query         |    Version:  3.1
 Severity:  normal        |   Keywords:  needs-patch
--------------------------+----------------------------
 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: [http://core.trac.wordpress.org/browser/trunk/wp-
 includes/meta.php?rev=17170#L423 Line 423] change from empty() to
 strlen()?

 Core includes a [http://core.trac.wordpress.org/changeset/17088#file2
 hack] to work around this already

-- 
Ticket URL: <http://core.trac.wordpress.org/ticket/16573>
WordPress Trac <http://core.trac.wordpress.org/>
WordPress blogging software


More information about the wp-trac mailing list