Revert changes to maybe_serialize() made in r13673. Do not prevent double-serialization of data. see #12930. see also #12416. xref #7347, r8100, r8372, and others.
git-svn-id: http://svn.automattic.com/wordpress/trunk@14074 1a063a9b-81f0-0310-95a4-ce76da25c4cd
This commit is contained in:
parent
ccb93ac4c7
commit
4975bf8ed8
|
@ -1008,7 +1008,10 @@ function delete_all_user_settings() {
|
||||||
* @return mixed A scalar data
|
* @return mixed A scalar data
|
||||||
*/
|
*/
|
||||||
function maybe_serialize( $data ) {
|
function maybe_serialize( $data ) {
|
||||||
if ( !is_scalar( $data ) )
|
if ( is_array( $data ) || is_object( $data ) )
|
||||||
|
return serialize( $data );
|
||||||
|
|
||||||
|
if ( is_serialized( $data ) )
|
||||||
return serialize( $data );
|
return serialize( $data );
|
||||||
|
|
||||||
return $data;
|
return $data;
|
||||||
|
|
Loading…
Reference in New Issue