[wp-trac] [WordPress Trac] #44303: `media_handle_sideload()` may unexpectedly return 0 on error
WordPress Trac
noreply at wordpress.org
Thu Jan 17 06:26:09 UTC 2019
#44303: `media_handle_sideload()` may unexpectedly return 0 on error
------------------------------+------------------------
Reporter: jirihon | Owner: joemcgill
Type: defect (bug) | Status: closed
Priority: normal | Milestone: 5.1
Component: Media | Version:
Severity: normal | Resolution: fixed
Keywords: has-patch commit | Focuses:
------------------------------+------------------------
Changes (by pento):
* status: accepted => closed
* resolution: => fixed
Comment:
In [changeset:"44634" 44634]:
{{{
#!CommitTicketReference repository="" revision="44634"
Media: `media_handle_sideload()` expectes `wp_insert_attachment()` to
return a `WP_Error`.
For `wp_insert_attachment()` to do that, we need to be setting the
`$wp_error` parameter to true.
Props subrataemfluence, jirihon.
Fixes #44303.
}}}
--
Ticket URL: <https://core.trac.wordpress.org/ticket/44303#comment:5>
WordPress Trac <https://core.trac.wordpress.org/>
WordPress publishing platform
More information about the wp-trac
mailing list