#61116 closed defect (bug) (fixed)
Return value of `_wp_delete_all_temp_backups()` isn't used
Reported by: | johnbillion | Owned by: | SergeyBiryukov |
---|---|---|---|
Milestone: | 6.7 | Priority: | normal |
Severity: | normal | Version: | 6.3 |
Component: | Upgrade/Install | Keywords: | has-patch |
Focuses: | Cc: |
Description
The _wp_delete_all_temp_backups()
function returns a WP_Error
object when there's a failure condition, but this function is only used as a cron event callback function so the return value is not used anywhere.
As core has no error handling for cron events, I recommend triggering an error for these conditions (probably via wp_trigger_error()
) and then doing early returns so the function returns void.
Attachments (1)
Change History (7)
This ticket was mentioned in PR #6565 on WordPress/wordpress-develop by @narenin.
4 months ago
#3
- Keywords has-patch added; needs-patch removed
Trac ticket: https://core.trac.wordpress.org/ticket/61116
#5
@
4 weeks ago
- Owner set to SergeyBiryukov
- Resolution set to fixed
- Status changed from new to closed
In 58906:
@SergeyBiryukov commented on PR #6565:
4 weeks ago
#6
Thanks for the PR! Merged in r58906.
Note: See
TracTickets for help on using
tickets.
Correction: This function is used as a
shutdown
action callback (ref), not a cron event callback. Same problem though.