Changeset 50656
- Timestamp:
- 04/04/2021 07:11:07 PM (4 years ago)
- Location:
- branches/5.7
- Files:
-
- 3 edited
Legend:
- Unmodified
- Added
- Removed
-
branches/5.7
-
branches/5.7/src/wp-includes/rest-api.php
r50655 r50656 1925 1925 1926 1926 return true; 1927 } 1928 1929 if ( is_int( $value1 ) && is_float( $value2 ) 1930 || is_float( $value1 ) && is_int( $value2 ) 1931 ) { 1932 return (float) $value1 === (float) $value2; 1927 1933 } 1928 1934 -
branches/5.7/tests/phpunit/tests/rest-api/rest-schema-validation.php
r50010 r50656 251 251 /** 252 252 * @ticket 51911 253 * @ticket 52932 253 254 * 254 255 * @dataProvider data_different_types_of_value_and_enum_elements … … 306 307 ), 307 308 array( 309 1, 310 array( 311 'type' => 'integer', 312 'enum' => array( 0.0, 1.0 ), 313 ), 314 true, 315 ), 316 array( 308 317 1.0, 309 318 array( … … 376 385 'type' => 'number', 377 386 'enum' => array( 0.0, 1.0 ), 387 ), 388 true, 389 ), 390 array( 391 1, 392 array( 393 'type' => 'number', 394 'enum' => array( 0, 1 ), 378 395 ), 379 396 true,
Note: See TracChangeset
for help on using the changeset viewer.