[wp-trac] [WordPress Trac] #44789: REST API: Improved media titles when created from filename
WordPress Trac
noreply at wordpress.org
Thu Oct 11 14:55:13 UTC 2018
#44789: REST API: Improved media titles when created from filename
----------------------------------------+-----------------------
Reporter: iCaleb | Owner: (none)
Type: defect (bug) | Status: new
Priority: normal | Milestone: 5.0
Component: REST API | Version:
Severity: normal | Resolution:
Keywords: has-patch needs-unit-tests | Focuses: rest-api
----------------------------------------+-----------------------
Comment (by dryanpress):
I've been testing this patch this morning.. wasn't immediately clear
Gutenberg had been shim'd to alter this behavior, so I spun wheels trying
to/being unable to recreate via Gutenberg 🤦♂️
Anyways, started to work through unit tests but brief update (I'll upload
a new patch when complete):
* Within else condition, passed $file param to basename() needs to be
$file['file'] based on returned associative keys from
wp_handle_sideload().
* Still tracing origin, but $this->upload_from_data is returning a
WP_Error instead of array after changing to $file['file']
--
Ticket URL: <https://core.trac.wordpress.org/ticket/44789#comment:3>
WordPress Trac <https://core.trac.wordpress.org/>
WordPress publishing platform
More information about the wp-trac
mailing list