--- a/wp/wp-includes/class-wp-date-query.php Tue Dec 15 15:52:01 2020 +0100
+++ b/wp/wp-includes/class-wp-date-query.php Wed Sep 21 18:19:35 2022 +0200
@@ -115,27 +115,27 @@
* arrays in some time-related parameters. Default '='.
* @type bool $inclusive Optional. Include results from dates specified in 'before' or
* 'after'. Default false.
- * @type int|array $year Optional. The four-digit year number. Accepts any four-digit year
+ * @type int|int[] $year Optional. The four-digit year number. Accepts any four-digit year
* or an array of years if `$compare` supports it. Default empty.
- * @type int|array $month Optional. The two-digit month number. Accepts numbers 1-12 or an
+ * @type int|int[] $month Optional. The two-digit month number. Accepts numbers 1-12 or an
* array of valid numbers if `$compare` supports it. Default empty.
- * @type int|array $week Optional. The week number of the year. Accepts numbers 0-53 or an
+ * @type int|int[] $week Optional. The week number of the year. Accepts numbers 0-53 or an
* array of valid numbers if `$compare` supports it. Default empty.
- * @type int|array $dayofyear Optional. The day number of the year. Accepts numbers 1-366 or an
+ * @type int|int[] $dayofyear Optional. The day number of the year. Accepts numbers 1-366 or an
* array of valid numbers if `$compare` supports it.
- * @type int|array $day Optional. The day of the month. Accepts numbers 1-31 or an array
+ * @type int|int[] $day Optional. The day of the month. Accepts numbers 1-31 or an array
* of valid numbers if `$compare` supports it. Default empty.
- * @type int|array $dayofweek Optional. The day number of the week. Accepts numbers 1-7 (1 is
+ * @type int|int[] $dayofweek Optional. The day number of the week. Accepts numbers 1-7 (1 is
* Sunday) or an array of valid numbers if `$compare` supports it.
* Default empty.
- * @type int|array $dayofweek_iso Optional. The day number of the week (ISO). Accepts numbers 1-7
+ * @type int|int[] $dayofweek_iso Optional. The day number of the week (ISO). Accepts numbers 1-7
* (1 is Monday) or an array of valid numbers if `$compare` supports it.
* Default empty.
- * @type int|array $hour Optional. The hour of the day. Accepts numbers 0-23 or an array
+ * @type int|int[] $hour Optional. The hour of the day. Accepts numbers 0-23 or an array
* of valid numbers if `$compare` supports it. Default empty.
- * @type int|array $minute Optional. The minute of the hour. Accepts numbers 0-60 or an array
+ * @type int|int[] $minute Optional. The minute of the hour. Accepts numbers 0-60 or an array
* of valid numbers if `$compare` supports it. Default empty.
- * @type int|array $second Optional. The second of the minute. Accepts numbers 0-60 or an
+ * @type int|int[] $second Optional. The second of the minute. Accepts numbers 0-60 or an
* array of valid numbers if `$compare` supports it. Default empty.
* }
* }
@@ -874,32 +874,32 @@
if ( preg_match( '/^(\d{4})$/', $datetime, $matches ) ) {
// Y
$datetime = array(
- 'year' => intval( $matches[1] ),
+ 'year' => (int) $matches[1],
);
} elseif ( preg_match( '/^(\d{4})\-(\d{2})$/', $datetime, $matches ) ) {
// Y-m
$datetime = array(
- 'year' => intval( $matches[1] ),
- 'month' => intval( $matches[2] ),
+ 'year' => (int) $matches[1],
+ 'month' => (int) $matches[2],
);
} elseif ( preg_match( '/^(\d{4})\-(\d{2})\-(\d{2})$/', $datetime, $matches ) ) {
// Y-m-d
$datetime = array(
- 'year' => intval( $matches[1] ),
- 'month' => intval( $matches[2] ),
- 'day' => intval( $matches[3] ),
+ 'year' => (int) $matches[1],
+ 'month' => (int) $matches[2],
+ 'day' => (int) $matches[3],
);
} elseif ( preg_match( '/^(\d{4})\-(\d{2})\-(\d{2}) (\d{2}):(\d{2})$/', $datetime, $matches ) ) {
// Y-m-d H:i
$datetime = array(
- 'year' => intval( $matches[1] ),
- 'month' => intval( $matches[2] ),
- 'day' => intval( $matches[3] ),
- 'hour' => intval( $matches[4] ),
- 'minute' => intval( $matches[5] ),
+ 'year' => (int) $matches[1],
+ 'month' => (int) $matches[2],
+ 'day' => (int) $matches[3],
+ 'hour' => (int) $matches[4],
+ 'minute' => (int) $matches[5],
);
}