From 4a2b2949a4b50f829c5ae95a76c83f33520b0f4d Mon Sep 17 00:00:00 2001 From: Shishir Mahato Date: Mon, 12 Jan 2026 23:56:47 +0530 Subject: [PATCH] Prevent undefined index notice in WP_Locale::get_weekday() --- src/wp-includes/class-wp-locale.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/wp-includes/class-wp-locale.php b/src/wp-includes/class-wp-locale.php index 0fcb130b81f9d..7416c3e316e0a 100644 --- a/src/wp-includes/class-wp-locale.php +++ b/src/wp-includes/class-wp-locale.php @@ -266,7 +266,7 @@ public function init() { * @return string Full translated weekday. */ public function get_weekday( $weekday_number ) { - return $this->weekday[ $weekday_number ]; + return isset( $this->weekday[ $weekday_number ] ) ? $this->weekday[ $weekday_number ] : ''; } /**