[wp-trac] [WordPress Trac] #47868: wp_delete_attachment returning successfully, deleting all DB data, but NOT deleting files, and NOT returning false

WordPress Trac noreply at wordpress.org
Tue Aug 20 03:45:18 UTC 2019


#47868: wp_delete_attachment returning successfully, deleting all DB data, but NOT
deleting files, and NOT returning false
--------------------------+------------------------------
 Reporter:  Jossnaz       |       Owner:  (none)
     Type:  defect (bug)  |      Status:  new
 Priority:  normal        |   Milestone:  Awaiting Review
Component:  Media         |     Version:
 Severity:  normal        |  Resolution:
 Keywords:  has-patch     |     Focuses:
--------------------------+------------------------------
Changes (by donmhico):

 * keywords:   => has-patch


Comment:

 @Jossnaz - makes sense. I attached a potential fix for the issue.
 [https://core.trac.wordpress.org/attachment/ticket/47868/47868.diff
 47868.diff]

 I also created a test unit for change but an existing test in the REST API
 fails.

 {{{
 1) WP_Test_REST_Attachments_Controller::test_delete_item
 Failed asserting that 500 matches expected 200.
 }}}

 I'm gonna look more into this a little later.

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


More information about the wp-trac mailing list