Make WordPress Core

Changes between Version 2 and Version 3 of Ticket #60052, comment 9


Ignore:
Timestamp:
02/20/2025 07:35:53 AM (16 months ago)
Author:
anthonythorne
Comment:

Legend:

Unmodified
Added
Removed
Modified
  • Ticket #60052, comment 9

    v2 v3  
    1 Testing Criteria & Summary of Unit Test
     1**Testing Criteria & Summary of Unit Test**
    22
    3 Testing Criteria:
     3**Testing Criteria:**
    44Ensure that an attachment can be deleted even when the post_tag taxonomy has been unregistered.
    55Verify that wp_delete_attachment() correctly handles the absence of post_tag without errors.
     
    77Confirm that the function returns a valid WP_Post object upon successful deletion.
    88
    9 Unit Test Summary:
     9**Unit Test Summary:**
    1010This unit test creates a test attachment, unregisters the category and post_tag taxonomies, and then attempts to delete the attachment using wp_delete_attachment(). In previous versions, deleting an attachment after unregistering post_tag could cause a failure (#60052). The test ensures that after the core patch, the function correctly handles missing taxonomies and successfully deletes the attachment. The test also explicitly removes taxonomy entries from $wp_taxonomies to fully replicate the missing taxonomy scenario.
    1111