Skip to content

Commit 4a2b294

Browse files
committed
Prevent undefined index notice in WP_Locale::get_weekday()
1 parent 8d52517 commit 4a2b294

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)