mirror of
git://develop.git.wordpress.org/
synced 2025-03-18 10:59:53 +01:00
When validating `enum` values as `integer` or `number`, consider a number with a zero fractional part to be equivalent to an integer of the same value. In `rest_are_values_equal()`, when comparing two values of type `int` or `float` (in any combination), first cast both of them to `float` and then compare. This matches some test cases from the official JSON Schema test suite. Follow-up to [50010]. Props yakimun, stefanjoebstl, TimothyBlynJacobs, rachelbaker. Fixes #52932. git-svn-id: https://develop.svn.wordpress.org/trunk@50653 602fd350-edb4-49c9-b593-d223f7449a82