#43344 closed defect (bug) (fixed)
$wp_locale->start_of_week is always NULL
Reported by: | tonybogdanov | Owned by: | ocean90 |
---|---|---|---|
Milestone: | 5.1 | Priority: | normal |
Severity: | minor | Version: | 4.4 |
Component: | I18N | Keywords: | has-patch |
Focuses: | Cc: |
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)
#1
@
7 years ago
- Focuses coding-standards added
- Keywords dev-feedback added
- Severity changed from normal to minor
#2
@
7 years ago
- Focuses coding-standards removed
- Keywords has-patch added
- Resolution set to invalid
- Status changed from new to closed
#3
@
7 years ago
- Resolution invalid deleted
- Status changed from closed to reopened
hmm, I didn't meant to close this as invalid, so I reopen the ticket ;-)
Note: See
TracTickets for help on using
tickets.
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_Locale
class, as it's not used anywhere and should have been removed in [35685].This part is removed in 43344.diff.