[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 16:54:06 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: reopened
Priority: normal | Milestone: 5.5.1
Component: Date/Time | Version: 5.5
Severity: normal | Resolution:
Keywords: has-patch has-unit- | Focuses: template, coding-
tests commit dev-feedback fixed- | standards
major |
-------------------------------------+-------------------------------------
Comment (by SergeyBiryukov):
I also missed that `get_the_modified_date()`/`get_the_modified_time()`
already have an `empty( $format )` check for the same use case, so it
seems better to stick with that in the other functions too for
consistency, and as a closer equivalent of the older code.
See [attachment:"51184.2.diff"].
--
Ticket URL: <https://core.trac.wordpress.org/ticket/51184#comment:22>
WordPress Trac <https://core.trac.wordpress.org/>
WordPress publishing platform
More information about the wp-trac
mailing list