[wp-trac] [WordPress Trac] #25834: WP_Date_Query not allowed values possible
WordPress Trac
noreply at wordpress.org
Wed Feb 19 20:42:36 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 Viper007Bond):
I'm not convinced that this change would be a good one.
What should happen when you pass an out of range date value to a
`WP_Query` call?
Should the invalid parameter be discarded and the query run without it? I
strongly think it shouldn't as it would make debugging a nightmare. It
should fail to return any posts as it does now.
Or perhaps the whole `WP_Query` call is aborted, but that would stop the
SQL filters from running where potentially it could be fixed or filtered
or whatever.
I'm recommending `wontfix` here. We didn't validate the data parameters
before I wrote `WP_Date_Query` either, nor do we currently validate many
other parameters -- we only sanitize and escape them.
--
Ticket URL: <https://core.trac.wordpress.org/ticket/25834#comment:12>
WordPress Trac <https://core.trac.wordpress.org/>
WordPress publishing platform
More information about the wp-trac
mailing list