[wp-trac] [WordPress Trac] #53940: Reconsider return types for `_get_cron_array()`.
WordPress Trac
noreply at wordpress.org
Tue Aug 17 15:24:03 UTC 2021
#53940: Reconsider return types for `_get_cron_array()`.
------------------------------------------+------------------------------
Reporter: peterwilsoncc | Owner: (none)
Type: defect (bug) | Status: new
Priority: normal | Milestone: Awaiting Review
Component: Cron API | Version:
Severity: normal | Resolution:
Keywords: needs-patch needs-unit-tests | Focuses:
------------------------------------------+------------------------------
Comment (by jrf):
> I also think always returning an array when there is no option/no cron
jobs is more consistent than returning a different type when there are
zero registered jobs depending on how they were deleted.
@peterwilsoncc I concur, though changing the return type is a BC-break and
may break code relying on the `false` return type.
FYI: we discussed this function and the return type in
[https://www.youtube.com/watch?v=MY1YsntrEQw last weeks livestream about
PHP 8.1].
--
Ticket URL: <https://core.trac.wordpress.org/ticket/53940#comment:1>
WordPress Trac <https://core.trac.wordpress.org/>
WordPress publishing platform
More information about the wp-trac
mailing list