Changeset 45754
- Timestamp:
- 08/05/2019 01:54:43 PM (6 years ago)
- Location:
- trunk
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/wp-includes/functions.php
r45742 r45754 529 529 case 'd': 530 530 $end = $strict ? '$' : ''; 531 return (bool) preg_match( "/^{$token}:[0-9.E -]+;$end/", $data );531 return (bool) preg_match( "/^{$token}:[0-9.E+-]+;$end/", $data ); 532 532 } 533 533 return false; -
trunk/tests/phpunit/tests/functions.php
r45607 r45754 227 227 foreach ( $not_serialized as $case ) { 228 228 $this->assertFalse( is_serialized( $case ), "Test data: $case" ); 229 } 230 } 231 232 /** 233 * @ticket 46570 234 */ 235 function test_is_serialized_should_return_true_for_large_floats() { 236 $cases = array( 237 serialize( 1.7976931348623157E+308 ), 238 serialize( array( 1.7976931348623157E+308, 1.23e50 ) ) 239 ); 240 241 foreach ( $cases as $case ) { 242 $this->assertTrue( is_serialized( $case ), "Serialized data: $case" ); 229 243 } 230 244 }
Note: See TracChangeset
for help on using the changeset viewer.