Opened 11 years ago
Closed 11 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 |
|---|---|---|---|
| Priority: | normal | Milestone: | |
| Component: | Cron API | Version: | 2.1 |
| Severity: | normal | Keywords: | |
| Cc: | Focuses: |
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
@
11 years ago
This patch is tested and ready to go. How can we move forward with this trivial update?
#4
@
11 years ago
I vote to close this ticket in favour of the more comprehensive ticket & patch https://core.trac.wordpress.org/ticket/21072.
#5
@
11 years ago
- Keywords has-patch removed
- Milestone Awaiting Review
- Resolution → duplicate
- Status assigned → 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.
![(please configure the [header_logo] section in trac.ini)](/chrome/site/your_project_logo.png)
Patch of wp-includes/cron.php