[wp-trac] [WordPress Trac] #25834: WP_Date_Query not allowed values possible

WordPress Trac noreply at wordpress.org
Wed Feb 26 09:12:12 UTC 2014


#25834: WP_Date_Query not allowed values possible
------------------------------------------+------------------
 Reporter:  ChriCo                        |       Owner:
     Type:  defect (bug)                  |      Status:  new
 Priority:  normal                        |   Milestone:  3.9
Component:  Query                         |     Version:  3.7
 Severity:  normal                        |  Resolution:
 Keywords:  needs-patch needs-unit-tests  |     Focuses:
------------------------------------------+------------------

Comment (by ChriCo):

 >I don't know of any cases right now where WP_Query validates input values
 and returns an error if you supply an out of bounds value.

 Never said something like that. I think you misunderstood me.

 Please read my patch.

 I only run the {{{validate_date_values()}}}-Method on {{{construct()}}} to
 check the given query-values and return {{{true}}} or {{{false}}} (i do
 '''not''' break the loop on error!).
 When {{{WP_DEBUG}}} is defined and {{{true}}} than the {{{trigger_error}}}
 will print out a '''E_USER_NOTICE'''. I don't manipulate the given values
 (not like the {{{validate_column()}}}-Method).
 I've moved the  WP_DEBUG-check to the {{{validate_date_values()}}}-Method,
 to make it reusable for other functions (wp_insert_post,
 wp_insert_commert(), ... ).

--
Ticket URL: <https://core.trac.wordpress.org/ticket/25834#comment:16>
WordPress Trac <https://core.trac.wordpress.org/>
WordPress publishing platform


More information about the wp-trac mailing list