mirror of
https://github.com/WordPress/WordPress.git
synced 2025-01-22 08:11:52 +01:00
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:
parent
989ddc7360
commit
8acacd62a0
@ -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;
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user