Skip to content

Commit ea5358e

Browse files
committed
Prevent undefined index notice in WP_Locale::get_weekday()
1 parent b47e1c7 commit ea5358e

1 file changed

Lines changed: 1 addition & 1 deletion

File tree

src/wp-includes/class-wp-locale.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -266,7 +266,7 @@ public function init() {
266266
* @return string Full translated weekday.
267267
*/
268268
public function get_weekday( $weekday_number ) {
269-
return $this->weekday[ $weekday_number ];
269+
return isset( $this->weekday[ $weekday_number ] ) ? $this->weekday[ $weekday_number ] : '';
270270
}
271271

272272
/**

0 commit comments

Comments
 (0)