#43344 closed defect (bug) (fixed)
$wp_locale->start_of_week is always NULL
| Reported by: | tonybogdanov | Owned by: | ocean90 |
|---|---|---|---|
| Priority: | normal | Milestone: | 5.1 |
| Component: | I18N | Version: | 4.4 |
| Severity: | minor | Keywords: | has-patch |
| Cc: | Focuses: |
Description
It seems that the start_of_week property of class WP_Locale (introduced in version 4.4) always resolves to NULL, because it is never initialized (determined by a quick global search for ->start_of_week).
It also seems like the rest of the codebase only relies on get_option('start_of_week'), including tests, thus nothing is really affected (seemingly) by the bug.
Perhaps someone just forgot to add $this->start_of_week = get_option('start_of_week'); in init()?
Attachments (1)
Change History (7)
Note:
See TracTickets
for help on using tickets.
![(please configure the [header_logo] section in trac.ini)](/chrome/site/your_project_logo.png)
Nice findings @tonybogdanov
I did some digging:
This was introduced in changeset [35336] for the ticket Remove "Week Starts On" setting UI #28344.
That ticket was then closed with a wontfix with new code additions reverted in changeset [35685], but the newly added property definition:
was not reverted as expected.
So I would suggest to remove it, from the
WP_Localeclass, as it's not used anywhere and should have been removed in [35685].This part is removed in 43344.diff.