Opened 10 years ago
Closed 9 years ago
#31598 closed defect (bug) (duplicate)
wp_schedule_single_event() should return true on success, false on failure
Reported by: | GhostToast | Owned by: | ericlewis |
---|---|---|---|
Milestone: | Priority: | normal | |
Severity: | normal | Version: | 2.1 |
Component: | Cron API | Keywords: | |
Focuses: | Cc: |
Description
Docbloc for wp_schedule_single_event()
indicates no return, yet it returns null
if the event is already scheduled, or false
if the event gets wiped out by a filter. It would be handy if the function returned true
on success.
This would aid in logic otherwise performed with wp_next_scheduled()
(which is called at the onset of wp_schedule_single_event()
). Patch attached.
Attachments (1)
Change History (6)
#2
@
9 years ago
This patch is tested and ready to go. How can we move forward with this trivial update?
#4
@
9 years ago
I vote to close this ticket in favour of the more comprehensive ticket & patch https://core.trac.wordpress.org/ticket/21072.
#5
@
9 years ago
- Keywords has-patch removed
- Milestone Awaiting Review deleted
- Resolution set to duplicate
- Status changed from assigned to closed
@jrf thanks for finding that! I agree.
@GhostToast thanks for opening up this ticket and welcome to WordPress Trac! Please follow along and feel free to participate in #21072 for follow-up on this issue.
Patch of wp-includes/cron.php