[wp-trac] [WordPress Trac] #38531: Support for arrays in schema validation and sanitization
WordPress Trac
noreply at wordpress.org
Mon Nov 7 16:26:57 UTC 2016
#38531: Support for arrays in schema validation and sanitization
-------------------------+--------------------------
Reporter: joehoyle | Owner: rachelbaker
Type: enhancement | Status: assigned
Priority: normal | Milestone: 4.7
Component: REST API | Version:
Severity: normal | Resolution:
Keywords: 2nd-opinion | Focuses:
-------------------------+--------------------------
Comment (by joehoyle):
> Currently validating / sanitizing php associative arrays work with a
schema 'type' => 'array' even though they're json objects. Not sure if
that's an issue or will be confusing but thought I'd mention.
Ahh, I think we should error on this case. I'll add a patch. If you send a
JSON object for an array, that is. I think we have some kind of
`wp_is_numeric_array()` function somewhere.
--
Ticket URL: <https://core.trac.wordpress.org/ticket/38531#comment:16>
WordPress Trac <https://core.trac.wordpress.org/>
WordPress publishing platform
More information about the wp-trac
mailing list