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:
ryan 2008-07-18 16:43:23 +00:00
parent cdcd6ffdf6
commit e97a8af5de
1 changed files with 3 additions and 3 deletions

View File

@ -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;
} }