From 8acacd62a08f7d09c5b6c1e832b96c39febd03fd Mon Sep 17 00:00:00 2001 From: markjaquith Date: Thu, 16 Apr 2009 21:03:18 +0000 Subject: [PATCH] Return false for corrupted serialized strings. props Denis-de-Bernardy. fixes #9549 git-svn-id: http://svn.automattic.com/wordpress/trunk@10955 1a063a9b-81f0-0310-95a4-ce76da25c4cd --- wp-includes/functions.php | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/wp-includes/functions.php b/wp-includes/functions.php index 940098d22..1ff8d11c6 100644 --- a/wp-includes/functions.php +++ b/wp-includes/functions.php @@ -226,8 +226,7 @@ function get_weekstartend( $mysqlstring, $start_of_week = '' ) { */ function maybe_unserialize( $original ) { if ( is_serialized( $original ) ) // don't attempt to unserialize data that wasn't serialized going in - if ( false !== $gm = @unserialize( $original ) ) - return $gm; + return @unserialize( $original ); return $original; }