From 37d5915b8eca3dd06988a2a6e4d0f332063d7775 Mon Sep 17 00:00:00 2001 From: Mark Jaquith Date: Mon, 17 Sep 2007 19:19:55 +0000 Subject: [PATCH] Use maybe_unserialize() in get_usermeta(). Props filosofo. fixes #4993 git-svn-id: https://develop.svn.wordpress.org/trunk@6124 602fd350-edb4-49c9-b593-d223f7449a82 --- wp-includes/user.php | 9 ++------- 1 file changed, 2 insertions(+), 7 deletions(-) diff --git a/wp-includes/user.php b/wp-includes/user.php index 6de070ab94..c1efcb6eaf 100644 --- a/wp-includes/user.php +++ b/wp-includes/user.php @@ -108,13 +108,8 @@ function get_usermeta( $user_id, $meta_key = '') { return ''; } - foreach ($metas as $index => $meta) { - @ $value = unserialize($meta->meta_value); - if ( $value === FALSE ) - $value = $meta->meta_value; - - $values[] = $value; - } + foreach ($metas as $meta) + $values[] = maybe_unserialize($meta->meta_value); if ( count($values) == 1 ) return $values[0];