Add note about why double-serialization is done. props SergeyBiryukov. fixes #16597
git-svn-id: http://svn.automattic.com/wordpress/trunk@18807 1a063a9b-81f0-0310-95a4-ce76da25c4cd
This commit is contained in:
parent
f1ffd16440
commit
58e0851786
|
@ -1037,6 +1037,8 @@ function maybe_serialize( $data ) {
|
||||||
if ( is_array( $data ) || is_object( $data ) )
|
if ( is_array( $data ) || is_object( $data ) )
|
||||||
return serialize( $data );
|
return serialize( $data );
|
||||||
|
|
||||||
|
// Double serialization is required for backward compatibility.
|
||||||
|
// See http://core.trac.wordpress.org/ticket/12930
|
||||||
if ( is_serialized( $data ) )
|
if ( is_serialized( $data ) )
|
||||||
return serialize( $data );
|
return serialize( $data );
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue