From e97a8af5de377fb83102e49bdc461487bc8994bb Mon Sep 17 00:00:00 2001 From: ryan Date: Fri, 18 Jul 2008 16:43:23 +0000 Subject: [PATCH] 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 --- wp-includes/functions.php | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/wp-includes/functions.php b/wp-includes/functions.php index 42aedb62d..4419998ea 100644 --- a/wp-includes/functions.php +++ b/wp-includes/functions.php @@ -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; }