[wp-trac] [WordPress Trac] #36941: media_sideload_image doesn't unlink tempfile on success

WordPress Trac noreply at wordpress.org
Wed May 25 16:25:40 UTC 2016


#36941: media_sideload_image doesn't unlink tempfile on success
--------------------------+-----------------------------
 Reporter:  ruud@…        |      Owner:
     Type:  defect (bug)  |     Status:  new
 Priority:  normal        |  Milestone:  Awaiting Review
Component:  Media         |    Version:  trunk
 Severity:  normal        |   Keywords:
  Focuses:                |
--------------------------+-----------------------------
 Hi,

 related to #34772 I was looking for more examples of not unlinking the
 tempfile. I think I found one in the media_sideload_image() method.

 after media_handle_sideload() is called successfully (line 875 in
 media.php), the $file_array[tmp_name] is only unlinked after a WP_ERROR is
 thrown, but not in the normal successful case at all.

--
Ticket URL: <https://core.trac.wordpress.org/ticket/36941>
WordPress Trac <https://core.trac.wordpress.org/>
WordPress publishing platform


More information about the wp-trac mailing list