diff --git a/wp-includes/class-wp-locale.php b/wp-includes/class-wp-locale.php index a78617b5e3..0fcb130b81 100644 --- a/wp-includes/class-wp-locale.php +++ b/wp-includes/class-wp-locale.php @@ -315,10 +315,14 @@ class WP_Locale { * @since 2.1.0 * * @param string|int $month_number '01' through '12'. - * @return string Translated full month name. + * @return string Translated full month name. If the month number is not found, an empty string is returned. */ public function get_month( $month_number ) { - return $this->month[ zeroise( $month_number, 2 ) ]; + $month_number = zeroise( $month_number, 2 ); + if ( ! isset( $this->month[ $month_number ] ) ) { + return ''; + } + return $this->month[ $month_number ]; } /** diff --git a/wp-includes/version.php b/wp-includes/version.php index e218ba53a2..1c53a575df 100644 --- a/wp-includes/version.php +++ b/wp-includes/version.php @@ -16,7 +16,7 @@ * * @global string $wp_version */ -$wp_version = '6.8-alpha-59869'; +$wp_version = '6.8-alpha-59870'; /** * Holds the WordPress DB revision, increments when changes are made to the WordPress DB schema.