Make WordPress Core

Opened 8 years ago

Last modified 7 years ago

#36437 new defect (bug)

wp_delete_attachment causes warning

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


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 8 years ago.

Download all attachments as: .zip

Change History (5)

8 years ago

#1 @swissspidy
8 years ago

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

#2 @desrosj
7 years ago

  • Keywords needs-unit-tests added

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

7 years ago

#4 @desrosj
7 years ago

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

Note: See TracTickets for help on using tickets.