[wp-trac] [WordPress Trac] #28208: in wp_handle_upload setting the overwrite `test_upload` to false won't work for move_uploaded_file

WordPress Trac noreply at wordpress.org
Tue Oct 28 21:16:08 UTC 2014


#28208: in wp_handle_upload setting the overwrite `test_upload` to false won't work
for move_uploaded_file
--------------------------+-----------------------------
 Reporter:  bassjobsen    |       Owner:  wonderboymusic
     Type:  defect (bug)  |      Status:  closed
 Priority:  normal        |   Milestone:  4.1
Component:  Upload        |     Version:  3.9.1
 Severity:  normal        |  Resolution:  fixed
 Keywords:  has-patch     |     Focuses:
--------------------------+-----------------------------
Changes (by wonderboymusic):

 * owner:   => wonderboymusic
 * status:  new => closed
 * resolution:   => fixed


Comment:

 In [changeset:"30076"]:
 {{{
 #!CommitTicketReference repository="" revision="30076"
 In `_wp_handle_upload()`, if `test_upload` is set to `false` in the array
 of dangerous overrides that the function allows, the only thing that
 happens when an upload fails is more potential breakage.

 `$test_uploaded_file` lets is know if `$file['tmp_name']` exists, which
 allows to exit with an error, instead of continuing to attempt to move the
 file.

 `$test_upload` override is now a noop.

 Fixes #28208.
 }}}

--
Ticket URL: <https://core.trac.wordpress.org/ticket/28208#comment:4>
WordPress Trac <https://core.trac.wordpress.org/>
WordPress publishing platform


More information about the wp-trac mailing list