[wp-trac] [WordPress Trac] #34913: Unscheduling cron jobs fails when original arguments were not an array.
WordPress Trac
noreply at wordpress.org
Thu Sep 2 05:39:24 UTC 2021
#34913: Unscheduling cron jobs fails when original arguments were not an array.
-------------------------------------------------+-------------------------
Reporter: jrf | Owner: (none)
Type: defect (bug) | Status: new
Priority: normal | Milestone: Awaiting
| Review
Component: Cron API | Version: 3.0
Severity: normal | Resolution:
Keywords: has-patch has-unit-tests 2nd- | Focuses:
opinion |
-------------------------------------------------+-------------------------
Comment (by peterwilsoncc):
@jrf and I had an in person discussion about this last night.
* the cause of this ticket is that the cron array includes items in stored
in an unexpected format
* unexpected data in the cron array was also causing a problem in PHP 8.1,
fixed in [51695]
* each of the cron functions assumes `_get_cron_array()` returns a
correctly formed cron array. This isn't entirely a safe assumption as a
plugin may save it incorrectly or filter the `cron` option getter.
As PHP becomes stricter about type and introduces more fatal errors for
incorrect type issues, we were considering whether it would be better to
validate the cron array on the way out.
--
Ticket URL: <https://core.trac.wordpress.org/ticket/34913#comment:14>
WordPress Trac <https://core.trac.wordpress.org/>
WordPress publishing platform
More information about the wp-trac
mailing list