[wp-trac] [WordPress Trac] #31067: WP_Date_Query - broken hour-validation

WordPress Trac noreply at wordpress.org
Wed Jan 21 12:23:41 UTC 2015


#31067: WP_Date_Query - broken hour-validation
------------------------------------------+---------------------------
 Reporter:  ChriCo                        |       Owner:  boonebgorges
     Type:  defect (bug)                  |      Status:  reopened
 Priority:  normal                        |   Milestone:  4.1.1
Component:  Query                         |     Version:  4.1
 Severity:  normal                        |  Resolution:
 Keywords:  has-patch commit fixed-major  |     Focuses:
------------------------------------------+---------------------------

Comment (by boonebgorges):

 > Why adding an is_numeric-Check here, when already one is there ?

 The one you linked to only checks the 'year'. Perhaps the 'year' one is no
 longer needed, but this needs testing.

 > Maybe we should also consider, if its a good way to move some checks out
 of the class and to the formattings.php.

 It seems a little bit verbose to have separate functions for all of this -
 it's not easy to see how they'd be used anywhere else in WordPress itself
 - but it might be worth considering having a single date validation
 function. If you think this is worth pursuing, please feel free to open an
 enhancement ticket.

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


More information about the wp-trac mailing list