[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
Sat Aug 29 09:02:17 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: needs-patch needs-unit-tests | Focuses:
------------------------------------------+-----------------------------
Comment (by wittich):
Replying to [comment:4 Rarst]:
> I would flip the statements and check for valid case first `if(
is_string( $format ) && '' !== $format )` and anything else would fall
back to default format.
Good idea, should I try it and send another pull request? No clue how you
guys handle it normally...
--
Ticket URL: <https://core.trac.wordpress.org/ticket/51184#comment:5>
WordPress Trac <https://core.trac.wordpress.org/>
WordPress publishing platform
More information about the wp-trac
mailing list