WordPress.org

Make WordPress Core

Opened 2 years ago

Last modified 10 months ago

#36437 new defect (bug)

wp_delete_attachment causes warning

Reported by: thorbrink Owned by:
Milestone: Awaiting Review Priority: normal
Severity: normal Version: 2.0
Component: Media Keywords: has-patch needs-unit-tests
Focuses: Cc:

Description

wp_delete_attachment assumes that attachments uses category and post_tag taxonomies. This causes a warning in wp_delete_object_term_relationships when post type attachment is not using category or post_tag taxonomies.

Attachments (1)

36437.patch (720 bytes) - added by thorbrink 2 years ago.

Download all attachments as: .zip

Change History (5)

@thorbrink
2 years ago

#1 @swissspidy
2 years ago

  • Component changed from General to Media
  • Keywords has-patch added
  • Version changed from 4.4.2 to 2.0

#2 @desrosj
11 months ago

  • Keywords needs-unit-tests added

This ticket was mentioned in Slack in #core-media by desrosj. View the logs.


10 months ago

#4 @desrosj
10 months ago

Hi @thorbrink, would you be able and interested in adding unit tests for this?

Note: See TracTickets for help on using tickets.