Opened 2 years ago
Closed 2 years ago
#52572 closed defect (bug) (fixed)
About the wp_error parameter of the pre_reschedule_event filter
Reported by: |
|
Owned by: |
|
---|---|---|---|
Milestone: | 5.7 | Priority: | normal |
Severity: | normal | Version: | 5.7 |
Component: | Cron API | Keywords: | has-patch has-unit-tests |
Focuses: | Cc: |
Description
I found a little something strange in the source code of cron.php.
It is in the wp_reschedule_event function.
$pre = apply_filters( 'pre_reschedule_event', null, $event );
The comment states that the wp_error parameter has been added,
and I think the following is correct:
$pre = apply_filters( 'pre_reschedule_event', null, $event, $wp_error );
Attachments (4)
Change History (12)
#1
@
2 years ago
- Keywords needs-patch needs-unit-tests added
- Milestone changed from Awaiting Review to 5.7
- Owner set to johnbillion
- Status changed from new to accepted
#3
@
2 years ago
Thanks for the patch! The alignment of the $wp_error
parameter in the DocBlock should not be changed, though. It is aligned with the $pre and $event parameters above, not with the keys of the $event
array.
#4
@
2 years ago
Thanks for review. 52572.2.diff patch updated.
#5
@
2 years ago
- Keywords has-unit-tests added; needs-unit-tests removed
52572.3.diff updates the existing tests to add assertions for the value of the $wp_error
parameter that's passed to the filters.
#7
in reply to:
↑ 6
@
2 years ago
Replying to johnbillion:
52572.4.diff updates some formatting in the tests for consistency.
Thanks @johnbillion .
I was impressed with the quick response.
Thanks @tmatsuur! Good spot.