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:
@@ -528,7 +528,7 @@ function is_serialized( $data, $strict = true ) {
|
||||
case 'i':
|
||||
case 'd':
|
||||
$end = $strict ? '$' : '';
|
||||
return (bool) preg_match( "/^{$token}:[0-9.E-]+;$end/", $data );
|
||||
return (bool) preg_match( "/^{$token}:[0-9.E+-]+;$end/", $data );
|
||||
}
|
||||
return false;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user