Don't return if is_string(). Proceed to check if is_serialized(). fixes #7347 for trunk
git-svn-id: https://develop.svn.wordpress.org/trunk@8372 602fd350-edb4-49c9-b593-d223f7449a82
This commit is contained in:
parent
5000a39eb0
commit
2be6bcf255
@ -630,12 +630,12 @@ function delete_option( $name ) {
|
||||
* @return mixed A scalar data
|
||||
*/
|
||||
function maybe_serialize( $data ) {
|
||||
if ( is_string( $data ) )
|
||||
return $data;
|
||||
elseif ( is_array( $data ) || is_object( $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