[wp-trac] [WordPress Trac] #15292: It's not possible to check for "meta_value = 0" in wp_query->get_posts
WordPress Trac
wp-trac at lists.automattic.com
Wed Feb 16 02:03:32 UTC 2011
#15292: It's not possible to check for "meta_value = 0" in wp_query->get_posts
-----------------------------------+-----------------------------
Reporter: hetjens | Owner: dd32
Type: defect (bug) | Status: accepted
Priority: normal | Milestone: Future Release
Component: Query | Version: 3.0.1
Severity: major | Resolution:
Keywords: needs-patch 3.2-early |
-----------------------------------+-----------------------------
Changes (by dd32):
* keywords: query, get_post, meta, meta_value dev-feedback => needs-patch
3.2-early
* owner: => dd32
* status: new => accepted
Comment:
Closed Ticket #16573 as duplicate.
> In 3.1, you can pass meta_value = '_wp_zero_value'.
For any developers coming across this, Please do not use it. Yes, It works
in 3.1 but it's [http://core.trac.wordpress.org/changeset/17088#file2 an
internal hack only].. You cannot rely on this being there for 3.2.
using strlen() on [http://core.trac.wordpress.org/browser/trunk/wp-
includes/meta.php?rev=17170#L423 Line 423] will probably fix this ticket.
--
Ticket URL: <http://core.trac.wordpress.org/ticket/15292#comment:4>
WordPress Trac <http://core.trac.wordpress.org/>
WordPress blogging software
More information about the wp-trac
mailing list