[wp-trac] [WordPress Trac] #28204: `media_sideload_image()` tries to unlink a WP_Error object.

WordPress Trac noreply at wordpress.org
Fri May 23 21:32:14 UTC 2014


#28204: `media_sideload_image()` tries to unlink a WP_Error object.
-----------------------------+-----------------------------
 Reporter:  georgestephanis  |       Owner:  wonderboymusic
     Type:  defect (bug)     |      Status:  closed
 Priority:  low              |   Milestone:  4.0
Component:  Media            |     Version:  2.7
 Severity:  minor            |  Resolution:  fixed
 Keywords:  has-patch        |     Focuses:
-----------------------------+-----------------------------
Changes (by wonderboymusic):

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


Comment:

 In [changeset:"28567"]:
 {{{
 #!CommitTicketReference repository="" revision="28567"
 In `media_sideload_image()`, check the returned value of `download_url()`
 earlier to avoid attempting to `unlink()` an instance of `WP_Error`.

 Props georgestephanis.
 Fixes #28204.
 }}}

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


More information about the wp-trac mailing list