[wp-trac] [WordPress Trac] #17235: meta_query fails if you don't pass in an array of arrays

WordPress Trac noreply at wordpress.org
Sat Oct 19 10:27:38 UTC 2013


#17235: meta_query fails if you don't pass in an array of arrays
--------------------------+------------------
 Reporter:  batmoo        |       Owner:
     Type:  defect (bug)  |      Status:  new
 Priority:  normal        |   Milestone:  3.8
Component:  Query         |     Version:  3.1
 Severity:  normal        |  Resolution:
 Keywords:  has-patch     |
--------------------------+------------------

Comment (by dannydehaan):

 I've made a different approach for this problem.

 The fix:
 Check if the meta_query exists, then check if it has the key "0" (so we
 know they're doing it right) and check if the meta_key, meta_value,
 meta_value_num exists, if false, then throw a _doing_it_wrong
 (@lucasstark) and unset the meta_query so we don't use unnecessary
 resources.

 Off course we could fix the problem for the programmer directly, but i
 think this doesn't solve the problem because then they won't learn to code
 correctly .

--
Ticket URL: <http://core.trac.wordpress.org/ticket/17235#comment:13>
WordPress Trac <http://core.trac.wordpress.org/>
WordPress blogging software


More information about the wp-trac mailing list