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
This commit is contained in:
markjaquith 2009-04-16 21:03:18 +00:00
parent 989ddc7360
commit 8acacd62a0
1 changed files with 1 additions and 2 deletions

View File

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