[wp-trac] [WordPress Trac] #16391: Don't add empty "_wp_attachment_metadata" on non-image media files
WordPress Trac
wp-trac at lists.automattic.com
Thu Jan 27 21:08:04 UTC 2011
#16391: Don't add empty "_wp_attachment_metadata" on non-image media files
--------------------------+-----------------------------
Reporter: Caspie | Owner:
Type: defect (bug) | Status: new
Priority: normal | Milestone: Awaiting Review
Component: Media | Version: 3.0.1
Severity: normal | Keywords:
--------------------------+-----------------------------
I'm currently working on a community project where there are a lot of
front-end file uploads. I've noticed that when you upload a non-image
file, an empty _wp_attachment_metadata is added to the postmeta table.
Just did a quick patch to check the $data in wp_update_attachment_metadata
function. And since $data comes always as an array from
wp_generate_attachment_metadata, we do not update if it is an empty array.
--
Ticket URL: <http://core.trac.wordpress.org/ticket/16391>
WordPress Trac <http://core.trac.wordpress.org/>
WordPress blogging software
More information about the wp-trac
mailing list