[wp-trac] [WordPress Trac] #58221: Cast (int) $cron->time - time() to prevent String - int error
WordPress Trac
noreply at wordpress.org
Fri Apr 28 22:56:39 UTC 2023
#58221: Cast (int) $cron->time - time() to prevent String - int error
----------------------------+------------------------------
Reporter: toddlahman | Owner: (none)
Type: defect (bug) | Status: new
Priority: normal | Milestone: Awaiting Review
Component: Site Health | Version: 6.2
Severity: critical | Resolution:
Keywords: has-patch php8 | Focuses:
----------------------------+------------------------------
Comment (by jrf):
@toddlahman Thanks for reporting this. What I'd be interested in, is to
see a `var_dump()` of the return value of `_get_cron_array()` and the
value of `$this->crons` from an install where this error is happening.
The `$this->crons[*]['time']` value should only ever be an integer and is
set from the `$timestamp` which is used as a key in the array returned
from `_get_cron_array()`.
So, before thinking in solutions (or working around/hiding the error), I'd
like to figure out how this error could happen in the first place.
--
Ticket URL: <https://core.trac.wordpress.org/ticket/58221#comment:4>
WordPress Trac <https://core.trac.wordpress.org/>
WordPress publishing platform
More information about the wp-trac
mailing list