[wp-trac] [WordPress Trac] #42961: Rest API doesnt handle empty arrays in querystring correctly
WordPress Trac
noreply at wordpress.org
Thu Dec 21 20:47:51 UTC 2017
#42961: Rest API doesnt handle empty arrays in querystring correctly
--------------------------+-----------------------------
Reporter: steffanhalv | Owner:
Type: defect (bug) | Status: new
Priority: normal | Milestone: Awaiting Review
Component: REST API | Version: 4.9.1
Severity: normal | Keywords:
Focuses: rest-api |
--------------------------+-----------------------------
Sending empty arrays to endpoints through Rest API is not handled
correctly by WP core.
Ex.
Querystring:
mysite.com/wp-json/...?my_empty_array[]=&... <- This works not
JSON:
data: { my_empty_array: [] } <- This works
When posting using json, empty array is handled correctly. When using
querystring, it fails.
Please see https://github.com/woocommerce/woocommerce/issues/18249
Could also have a possible relationship with ticket:
https://core.trac.wordpress.org/ticket/42752
(https://github.com/woocommerce/woocommerce/issues/17954)
--
Ticket URL: <https://core.trac.wordpress.org/ticket/42961>
WordPress Trac <https://core.trac.wordpress.org/>
WordPress publishing platform
More information about the wp-trac
mailing list