#61116 closed defect (bug) (fixed)
Return value of `_wp_delete_all_temp_backups()` isn't used
| Reported by: | johnbillion | Owned by: | SergeyBiryukov |
|---|---|---|---|
| Priority: | normal | Milestone: | 6.7 |
| Component: | Upgrade/Install | Version: | 6.3 |
| Severity: | normal | Keywords: | has-patch |
| Cc: | Focuses: |
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.
2 years ago
#3
- Keywords has-patch added; needs-patch removed
Trac ticket: https://core.trac.wordpress.org/ticket/61116
@SergeyBiryukov commented on PR #6565:
2 years ago
#6
Thanks for the PR! Merged in r58906.
![(please configure the [header_logo] section in trac.ini)](/chrome/site/your_project_logo.png)
Correction: This function is used as a
shutdownaction callback (ref), not a cron event callback. Same problem though.