mirror of
git://develop.git.wordpress.org/
synced 2025-02-15 12:16:12 +01:00
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