[wp-trac] [WordPress Trac] #13810: media form errors not displaying on /wp-admin/media.php?action=edit&attachment_id=##
WordPress Trac
wp-trac at lists.automattic.com
Thu Jun 10 04:18:57 UTC 2010
#13810: media form errors not displaying on /wp-
admin/media.php?action=edit&attachment_id=##
----------------------------+-----------------------------------------------
Reporter: andyblackwell | Owner: andyblackwell
Type: defect (bug) | Status: new
Priority: normal | Milestone: Unassigned
Component: Administration | Version: 3.0
Severity: normal | Keywords: has-patch
----------------------------+-----------------------------------------------
form errors not showing on the single media edit page:
/wp-admin/media.php?action=edit&attachment_id=##
This is due to the $errors array being passed incorrectly to the
get_media_item() function in /wp-admin/media.php. The $errors array is
sent back from media_upload_form_handler() as an array of error arrays
having attachment ids as the key for each. Was simply an accident of
passing the full array ($errors) rather than just the key needed
($errors[$attachment->ID]) causing a bad array merge later which is why
the errors don't display. Probably happened because the full $errors array
is passed to the plural get_media_items() function.
Looks like this bug has gone unnoticed since at least early 2008.
Patch included.
--
Ticket URL: <http://core.trac.wordpress.org/ticket/13810>
WordPress Trac <http://core.trac.wordpress.org/>
WordPress blogging software
More information about the wp-trac
mailing list