[wp-trac] [WordPress Trac] #61117: Guard condition in `delete_temp_backup()` shouldn't return early

WordPress Trac noreply at wordpress.org
Thu Jun 13 17:39:42 UTC 2024


#61117: Guard condition in `delete_temp_backup()` shouldn't return early
-----------------------------+---------------------
 Reporter:  johnbillion      |       Owner:  (none)
     Type:  defect (bug)     |      Status:  new
 Priority:  low              |   Milestone:  6.6
Component:  Upgrade/Install  |     Version:  6.3
 Severity:  normal           |  Resolution:
 Keywords:  has-patch        |     Focuses:
-----------------------------+---------------------

Comment (by jamieblomerus):

 During today's bug scrub, it was highlighted that the patch needs testing,
 and guidance was sought for from people who know more about this. The
 discussion focused on whether true or false should be returned when
 deletion is skipped, considering the potential impact on other parts of
 the code. It was noted that low-level APIs typically return true for
 successful deletion or when the item to be deleted does not exist.

 Suggestions for handling broken backups included using `unset()`, adding
 an error, or utilizing `wp_trigger_error()` behind a `WP_DEBUG` flag.

 We felt like a more extensive discussion is needed.

-- 
Ticket URL: <https://core.trac.wordpress.org/ticket/61117#comment:4>
WordPress Trac <https://core.trac.wordpress.org/>
WordPress publishing platform


More information about the wp-trac mailing list