[wp-trac] [WordPress Trac] #51184: get_the_date() checks $format only for empty variable and fails on false boolean - since WP 5.5
WordPress Trac
noreply at wordpress.org
Mon Aug 31 22:36:14 UTC 2020
#51184: get_the_date() checks $format only for empty variable and fails on false
boolean - since WP 5.5
-------------------------------------+-------------------------------------
Reporter: wittich | Owner: SergeyBiryukov
Type: defect (bug) | Status: closed
Priority: normal | Milestone: 5.5.1
Component: Date/Time | Version: 5.5
Severity: normal | Resolution: fixed
Keywords: has-patch has-unit- | Focuses: template, coding-
tests commit dev-reviewed fixed- | standards
major |
-------------------------------------+-------------------------------------
Comment (by SergeyBiryukov):
Replying to [comment:30 wittich]:
> Did I see it correct that there was no testing for
`get_the_modified_date()` and `get_the_modified_time()` yet?
>
> Here is my suggestion s.
[https://core.trac.wordpress.org/attachment/ticket/51184/51166.3.diff
51166.3.diff]
That looks great, thank you! It looks like there were some existing tests
in `general/template.php`. I think it would make sense to move them to a
new file: `date/getTheModifiedDate.php`. I'll handle it on commit.
> Also, I made the test functions public as told by `phpcs`. Looking
through the test, that's really inconsistent used so far. Maybe a follow-
up ticket for the future?
A follow-up ticket for bringing some consistency to the `public` modifiers
also sounds good :)
--
Ticket URL: <https://core.trac.wordpress.org/ticket/51184#comment:31>
WordPress Trac <https://core.trac.wordpress.org/>
WordPress publishing platform
More information about the wp-trac
mailing list