[wp-trac] [WordPress Trac] #53950: `wp_schedule_single_event()` may add incorrectly populate the cron array.
WordPress Trac
noreply at wordpress.org
Wed Aug 18 03:03:33 UTC 2021
#53950: `wp_schedule_single_event()` may add incorrectly populate the cron array.
---------------------------+-----------------------------
Reporter: peterwilsoncc | Owner: (none)
Type: defect (bug) | Status: new
Priority: normal | Milestone: Awaiting Review
Component: Cron API | Version: 5.2
Severity: normal | Keywords:
Focuses: |
---------------------------+-----------------------------
In [44917] for #44818 `wp_schedule_single_event()` started casting the
result of `_get_cron_array()` to an array.
As `_get_cron_array()` can return `false` if the option does not exist/is
of incorrect type then this can result in a malformed cron array (see
#53940 for discussion).
If the getter returns `false`, `wp_schedule_single_event()` will set the
cron array to `[ false ]`. The single event being scheduled will then be
appended to the malformed cron array.
This is an edge case as it relies on either the `cron` option to be
malformed or deleted. WordPress populates the cron array with recurring
events during installation and `wp_schedule_event()` doesn't share this
problem.
--
Ticket URL: <https://core.trac.wordpress.org/ticket/53950>
WordPress Trac <https://core.trac.wordpress.org/>
WordPress publishing platform
More information about the wp-trac
mailing list