[wp-trac] [WordPress Trac] #40861: REST API saves attachments with absolute path for `_wp_attached_file` on Windows platforms
WordPress Trac
noreply at wordpress.org
Fri Mar 2 10:13:21 UTC 2018
#40861: REST API saves attachments with absolute path for `_wp_attached_file` on
Windows platforms
----------------------------------------+------------------
Reporter: redcastor | Owner:
Type: defect (bug) | Status: new
Priority: normal | Milestone: 5.0
Component: REST API | Version: 4.6
Severity: normal | Resolution:
Keywords: has-patch needs-unit-tests | Focuses:
----------------------------------------+------------------
Changes (by ocean90):
* keywords: needs-patch => has-patch needs-unit-tests
Comment:
Attached [attachment:40861.patch] and [attachment:40861.2.patch].
Since `wp_insert_post()` expects slashed data we should unslash the file
argument as well, done in [attachment:40861.patch].
In [attachment:40861.2.patch] I switched to `wp_insert_attachment()` so
the file argument doesn't get slashed in the first place.
--
Ticket URL: <https://core.trac.wordpress.org/ticket/40861#comment:5>
WordPress Trac <https://core.trac.wordpress.org/>
WordPress publishing platform
More information about the wp-trac
mailing list