[wp-trac] [WordPress Trac] #55280: Unsupported operand types in Site Health
WordPress Trac
noreply at wordpress.org
Tue Aug 2 23:35:53 UTC 2022
#55280: Unsupported operand types in Site Health
--------------------------+----------------------------------------
Reporter: lw5 | Owner: (none)
Type: defect (bug) | Status: new
Priority: normal | Milestone: Awaiting Review
Component: Site Health | Version: 5.9.1
Severity: normal | Resolution:
Keywords: php8 | Focuses: administration, multisite
--------------------------+----------------------------------------
Comment (by peterwilsoncc):
Thanks for the ping, Juliette.
Currently, either `_set_cron_array()` not `_get_cron_array()` check the
form of each entry for validity. As with the timestamp, it's also possible
the event is incorrectly formatted.
A number of plugins call either the private
[https://wpdirectory.net/search/01G9GCJWSQEYHMA7BKST945MA5
_set_cron_array()] function or
[https://wpdirectory.net/search/01G9GCV337ZJHD7HWZ47NYASQ5 directly set
the cron option].
I think the safest approach is to:
* add `cron` to `sanitize_option()` to check for validity
* include `_set_cron_array( _get_cron_array() );` in an upgrade routine
I do worry about the performance impact of this on sites with a large
array of cron jobs as this would increase both the number of events to be
validated and the frequency with which the option is updated.
--
Ticket URL: <https://core.trac.wordpress.org/ticket/55280#comment:6>
WordPress Trac <https://core.trac.wordpress.org/>
WordPress publishing platform
More information about the wp-trac
mailing list