[wp-trac] [WordPress Trac] #36941: media_sideload_image doesn't unlink tempfile on success
WordPress Trac
noreply at wordpress.org
Mon Jul 18 21:43:40 UTC 2016
#36941: media_sideload_image doesn't unlink tempfile on success
--------------------------+----------------------
Reporter: ruud@… | Owner: dd32
Type: defect (bug) | Status: closed
Priority: normal | Milestone:
Component: Media | Version:
Severity: normal | Resolution: invalid
Keywords: has-patch | Focuses:
--------------------------+----------------------
Changes (by ocean90):
* keywords: has-patch needs-testing => has-patch
* status: accepted => closed
* resolution: => invalid
* milestone: 4.6 =>
Comment:
`media_handle_sideload()` passes the file array to `wp_handle_sideload()`
which uses `_wp_handle_upload()`. `_wp_handle_upload()` (re)moves the
temporary file on success, see
https://core.trac.wordpress.org/browser/trunk/src/wp-
admin/includes/file.php?rev=38015&marks=373,376#L370.
That's why `media_handle_sideload()` only needs to handle the failure
case.
--
Ticket URL: <https://core.trac.wordpress.org/ticket/36941#comment:6>
WordPress Trac <https://core.trac.wordpress.org/>
WordPress publishing platform
More information about the wp-trac
mailing list