Opened 7 years ago
Closed 7 years ago
#46627 closed defect (bug) (fixed)
is_new_day uses a weak comparison
| Reported by: | pbearne | Owned by: | SergeyBiryukov |
|---|---|---|---|
| Priority: | low | Milestone: | 5.3 |
| Component: | Date/Time | Version: | |
| Severity: | normal | Keywords: | has-unit-tests dev-feedback has-patch |
| Cc: | Focuses: |
Description (last modified by )
The is_new_day() function uses != to test I see no reason why we can't change this too !==
So I have added a patch to do this and Unit test to check it
Attachments (4)
Change History (8)
#1
@
7 years ago
If it, not felt that we should "fix" the function I have attached a unit test for the current code
part of my ongoing project to add unit tests for all function in functions.php :-)
Note:
See TracTickets
for help on using tickets.
![(please configure the [header_logo] section in trac.ini)](/chrome/site/your_project_logo.png)
patch with unit test