[wp-trac] [WordPress Trac] #61116: Return value of `_wp_delete_all_temp_backups()` isn't used
WordPress Trac
noreply at wordpress.org
Wed May 1 21:47:49 UTC 2024
#61116: Return value of `_wp_delete_all_temp_backups()` isn't used
-----------------------------+----------------------------
Reporter: johnbillion | Owner: (none)
Type: defect (bug) | Status: new
Priority: normal | Milestone: Future Release
Component: Upgrade/Install | Version: 6.3
Severity: normal | Keywords: needs-patch
Focuses: |
-----------------------------+----------------------------
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.
--
Ticket URL: <https://core.trac.wordpress.org/ticket/61116>
WordPress Trac <https://core.trac.wordpress.org/>
WordPress publishing platform
More information about the wp-trac
mailing list