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: https://develop.svn.wordpress.org/trunk@14074 602fd350-edb4-49c9-b593-d223f7449a82
This commit is contained in:
parent
72f51642c5
commit
74cfa717cb
@ -1008,7 +1008,10 @@ function delete_all_user_settings() {
|
||||
* @return mixed A scalar 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 $data;
|
||||
|
Loading…
Reference in New Issue
Block a user