From 2be6bcf255ac9ddd8691acaa6c5d86f63e2156b0 Mon Sep 17 00:00:00 2001 From: Ryan Boren 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: https://develop.svn.wordpress.org/trunk@8372 602fd350-edb4-49c9-b593-d223f7449a82 --- 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 42aedb62de..4419998ea5 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; }