Don't return if is_string(). Proceed to check if is_serialized(). fixes #7347 for trunk
git-svn-id: http://svn.automattic.com/wordpress/trunk@8372 1a063a9b-81f0-0310-95a4-ce76da25c4cd
This commit is contained in:
parent
cdcd6ffdf6
commit
e97a8af5de
|
@ -630,12 +630,12 @@ function delete_option( $name ) {
|
||||||
* @return mixed A scalar data
|
* @return mixed A scalar data
|
||||||
*/
|
*/
|
||||||
function maybe_serialize( $data ) {
|
function maybe_serialize( $data ) {
|
||||||
if ( is_string( $data ) )
|
if ( is_array( $data ) || is_object( $data ) )
|
||||||
return $data;
|
|
||||||
elseif ( is_array( $data ) || is_object( $data ) )
|
|
||||||
return serialize( $data );
|
return serialize( $data );
|
||||||
|
|
||||||
if ( is_serialized( $data ) )
|
if ( is_serialized( $data ) )
|
||||||
return serialize( $data );
|
return serialize( $data );
|
||||||
|
|
||||||
return $data;
|
return $data;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue