From f30cd7acec1a10def114268a4dfec18069017760 Mon Sep 17 00:00:00 2001 From: markjaquith Date: Mon, 17 Sep 2007 19:19:55 +0000 Subject: [PATCH] Use maybe_unserialize() in get_usermeta(). Props filosofo. fixes #4993 git-svn-id: http://svn.automattic.com/wordpress/trunk@6124 1a063a9b-81f0-0310-95a4-ce76da25c4cd --- 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];