[wp-trac] [WordPress Trac] #20666: Custom header image cropping can create identical attachments

WordPress Trac wp-trac at lists.automattic.com
Sun May 13 16:53:46 UTC 2012


#20666: Custom header image cropping can create identical attachments
----------------------------+-------------------------
 Reporter:  SergeyBiryukov  |      Owner:
     Type:  defect (bug)    |     Status:  new
 Priority:  normal          |  Milestone:  3.4
Component:  Appearance      |    Version:  3.4
 Severity:  normal          |   Keywords:  needs-patch
----------------------------+-------------------------
 1. Add an image to Media Library which requires cropping.
 2. Go to Appearance → Header, click "Choose from image library".
 3. Select the image from point 1, click "Set as header", "Crop and
 Publish".
 4. Press browser's Back button, click "Crop and Publish" once again.
 5. Delete one of the two identical "Header Image" attachments in Media
 Library.
 6. The other attachment is now orphaned (the files are deleted in point
 5).

 Sounds like `wp_unique_filename()` should be used in there somewhere.

 Related: #19840, #20657

-- 
Ticket URL: <http://core.trac.wordpress.org/ticket/20666>
WordPress Trac <http://core.trac.wordpress.org/>
WordPress blogging software


More information about the wp-trac mailing list