[wp-trac] [WordPress Trac] #57035: Error in current_time() function when using timestamp and no value for gmt_offset
WordPress Trac
noreply at wordpress.org
Wed Jan 11 23:18:28 UTC 2023
#57035: Error in current_time() function when using timestamp and no value for
gmt_offset
-----------------------------------+-----------------------
Reporter: Nick_theGeek | Owner: audrasjb
Type: defect (bug) | Status: closed
Priority: normal | Milestone: 6.2
Component: Date/Time | Version: 5.3
Severity: normal | Resolution: fixed
Keywords: has-patch php8 commit | Focuses:
-----------------------------------+-----------------------
Changes (by audrasjb):
* owner: (none) => audrasjb
* status: new => closed
* resolution: => fixed
Comment:
In [changeset:"55054" 55054]:
{{{
#!CommitTicketReference repository="" revision="55054"
Date/Time: Prevent errors in `current_time()` when using timestamp and no
value for `gmt_offset`.
This changeset moves typecasting to affect the `get_option` value, which
ensures that when math is done it does not generate any error. In PHP 7.4
and earlier the previous implementation was dismissed as a warning, but in
PHP 8+ it would have throw a fatal error.
Follow-up to [45856].
Props Nick_theGeek, SergeyBiryukov, johnbillion.
Fixes #57035.
}}}
--
Ticket URL: <https://core.trac.wordpress.org/ticket/57035#comment:9>
WordPress Trac <https://core.trac.wordpress.org/>
WordPress publishing platform
More information about the wp-trac
mailing list