Repository navigation
Commit e4f3252
Date/Time: Clamp the start of the week in get_calendar().
The `start_of_week` option is cast to an int but otherwise unchecked, so a
negative value makes `( $wdcount + $week_begins ) % 7` negative, and a value
above 6 is out of range for `WP_Locale::get_weekday()`. Either leads to an
undefined array key. Clamping it to 0-6 keeps the weekday headers valid and
satisfies the new `int<0, 6>` type of `WP_Locale::get_weekday()`.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>1 parent fefbbea commit e4f3252
1 file changed
Lines changed: 1 addition & 1 deletion
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
2666 | 2666 | | |
2667 | 2667 | | |
2668 | 2668 | | |
2669 | | - | |
| 2669 | + | |
2670 | 2670 | | |
2671 | 2671 | | |
2672 | 2672 | | |
| |||
0 commit comments