[wp-trac] [WordPress Trac] #25834: WP_Date_Query not allowed values possible
WordPress Trac
noreply at wordpress.org
Sun Dec 1 08:09:57 UTC 2013
#25834: WP_Date_Query not allowed values possible
--------------------------+------------------------------
Reporter: ChriCo | Owner:
Type: defect (bug) | Status: new
Priority: normal | Milestone: Awaiting Review
Component: Query | Version: 3.7
Severity: normal | Resolution:
Keywords: |
--------------------------+------------------------------
Comment (by toscho):
Replying to [comment:8 SergeyBiryukov]:
> `WP_Date_Query::get_sql()` is supposed to return a string, so returning
a `WP_Error` object might break some code.
Which code? These cases are broken already, we just give no useful
response. :)
With an error object we could do something useful, e.g.:
{{{
$date_query = new WP_Date_Query( array( /* data */ ) );
if ( is_wp_error( $date_query ) )
// stop here, log the error message
}}}
--
Ticket URL: <http://core.trac.wordpress.org/ticket/25834#comment:9>
WordPress Trac <http://core.trac.wordpress.org/>
WordPress blogging software
More information about the wp-trac
mailing list