Make WordPress Core


Ignore:
Timestamp:
02/09/2015 02:32:31 AM (12 years ago)
Author:
dd32
Message:

WP_Date_Query date validation should not fail for hour = 0.

Props ChriCo, tyxla.
Merges [31251] to the 4.1 branch.
Fixes #31067.

Location:
branches/4.1
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • branches/4.1

  • branches/4.1/src/wp-includes/date.php

    r30751 r31377  
    361361                // Hours per day.
    362362                $min_max_checks['hour'] = array(
    363                         'min' => 1,
     363                        'min' => 0,
    364364                        'max' => 23
    365365                );
     
    385385                        $is_between = $date_query[ $key ] >= $check['min'] && $date_query[ $key ] <= $check['max'];
    386386
    387                         if ( ! $is_between ) {
     387                        if ( ! is_numeric( $date_query[ $key ] ) || ! $is_between ) {
    388388
    389389                                $error = sprintf(
Note: See TracChangeset for help on using the changeset viewer.