[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 18:56:38 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 |
-------------------------------------+-------------------------------------
Changes (by desrosj):
* status: reopened => closed
* resolution: => fixed
Comment:
In [changeset:"48921" 48921]:
{{{
#!CommitTicketReference repository="" revision="48921"
Date/Time: Make sure `get_the_date()` and related functions return correct
time if the format was specified as `false`.
Technically, the `$format` argument should always be a string, but passing
`false` used to work before [47808], so this restores backward
compatibility.
The list of affected functions:
- `get_the_date()`
- `get_the_time()`
- `get_comment_date()`
- `get_comment_time()`
Props wittich, Rarst, akabarikalpesh, SergeyBiryukov.
Merges [48912] to the 5.5 branch.
Fixes #51184.
}}}
--
Ticket URL: <https://core.trac.wordpress.org/ticket/51184#comment:28>
WordPress Trac <https://core.trac.wordpress.org/>
WordPress publishing platform
More information about the wp-trac
mailing list