General: Trim the input data in `maybe_unserialize()`, for consistency with `is_serialized()`.
Props pbearne, mikeschroder. Fixes #36416. Built from https://develop.svn.wordpress.org/trunk@47454 git-svn-id: http://core.svn.wordpress.org/trunk@47241 1a063a9b-81f0-0310-95a4-ce76da25c4cd
This commit is contained in:
parent
0dc46c0ba5
commit
d5f942d7ba
|
@ -616,7 +616,7 @@ function maybe_serialize( $data ) {
|
|||
*/
|
||||
function maybe_unserialize( $data ) {
|
||||
if ( is_serialized( $data ) ) { // Don't attempt to unserialize data that wasn't serialized going in.
|
||||
return @unserialize( $data );
|
||||
return @unserialize( trim( $data ) );
|
||||
}
|
||||
|
||||
return $data;
|
||||
|
|
|
@ -13,7 +13,7 @@
|
|||
*
|
||||
* @global string $wp_version
|
||||
*/
|
||||
$wp_version = '5.5-alpha-47453';
|
||||
$wp_version = '5.5-alpha-47454';
|
||||
|
||||
/**
|
||||
* Holds the WordPress DB revision, increments when changes are made to the WordPress DB schema.
|
||||
|
|
Loading…
Reference in New Issue