General: Correctly detect large floats in `is_serialized()`.

Props killerbishop, donmhico, hoythan.
Fixes #46570.
Built from https://develop.svn.wordpress.org/trunk@45754


git-svn-id: http://core.svn.wordpress.org/trunk@45565 1a063a9b-81f0-0310-95a4-ce76da25c4cd
This commit is contained in:
Sergey Biryukov 2019-08-05 13:55:57 +00:00
parent d5fc1647c0
commit 282dfee8e0
2 changed files with 2 additions and 2 deletions

View File

@ -528,7 +528,7 @@ function is_serialized( $data, $strict = true ) {
case 'i': case 'i':
case 'd': case 'd':
$end = $strict ? '$' : ''; $end = $strict ? '$' : '';
return (bool) preg_match( "/^{$token}:[0-9.E-]+;$end/", $data ); return (bool) preg_match( "/^{$token}:[0-9.E+-]+;$end/", $data );
} }
return false; return false;
} }

View File

@ -13,7 +13,7 @@
* *
* @global string $wp_version * @global string $wp_version
*/ */
$wp_version = '5.3-alpha-45753'; $wp_version = '5.3-alpha-45754';
/** /**
* Holds the WordPress DB revision, increments when changes are made to the WordPress DB schema. * Holds the WordPress DB revision, increments when changes are made to the WordPress DB schema.