From 84b875a9035098ea59cdbd74855ed0c143f96779 Mon Sep 17 00:00:00 2001 From: Mark Jaquith 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: https://develop.svn.wordpress.org/trunk@10955 602fd350-edb4-49c9-b593-d223f7449a82 --- 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 940098d22d..1ff8d11c6d 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; }