[wp-trac] [WordPress Trac] #10238: A failed upload loses its error
messages
WordPress Trac
wp-trac at lists.automattic.com
Mon Jun 22 21:10:45 GMT 2009
#10238: A failed upload loses its error messages
--------------------------+-------------------------------------------------
Reporter: filosofo | Owner:
Type: defect (bug) | Status: new
Priority: high | Milestone: 2.8.1
Component: Media | Version: 2.8
Severity: major | Keywords: media_upload_form_handler has-patch upload
--------------------------+-------------------------------------------------
If there are errors in some uploads, WP fails to report it because the
errors are erased. That happens because the {{{$errors}}} variable is
initialized at the top of {{{media_upload_form_handler()}}} to an empty
array (new behavior in 2.8), but lines like 490 of wp-
admin/includes/media.php set {{{$errors}}} to the (sometimes empty)
{{{$return}}} variable returned by {{{media_upload_form_handler()}}} when
that {{{$return}}} variable is an array.
Prior to 2.8, the behavior was that {{{media_upload_form_handler()}}}
would return NULL, so {{{$errors}}} would remain. Now,
{{{media_upload_form_handler()}}} returns an empty array, and
{{{$errors}}} is set to that empty array.
Patch initializes {{{$errors}}} in {{{media_upload_form_handler()}}} to
NULL.
I think this is related to #10153 among others.
--
Ticket URL: <http://core.trac.wordpress.org/ticket/10238>
WordPress Trac <http://core.trac.wordpress.org/>
WordPress blogging software
More information about the wp-trac
mailing list