Wordpress/tests
Timothy Jacobs 6c76a13139 REST API: Fix multi-type schemas with integer fields.
In [48306] support for multi-typed schemas was improved to first detect the data type of the value before applying further validation. The `integer` data type was detected using the new `rest_is_integer` function. This function used logic, however, that assumed that the value had already passed an `is_numeric` check. This meant that if `integer` and `string` were both acceptable types, the value would always be considered an `integer` causing the later accurate type validation to fail.

This commit fixes the `rest_is_integer` logic to include an `is_numeric` check.

Props rtagliento.
Fixes #51146.


git-svn-id: https://develop.svn.wordpress.org/trunk@48881 602fd350-edb4-49c9-b593-d223f7449a82
2020-08-27 02:55:39 +00:00
..
e2e Editor: update JavaScript packages 2020-06-26 13:31:11 +00:00
gutenberg Block Editor: Add a script to run Gutenberg end 2 end tests on Core. 2020-07-07 16:06:43 +00:00
phpunit REST API: Fix multi-type schemas with integer fields. 2020-08-27 02:55:39 +00:00
qunit Tests: Update wp-api-generated.js to reflect the new "Reusable Blocks" post type label. 2020-08-23 14:38:40 +00:00