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
This commit is contained in:
markjaquith 2007-09-17 19:19:55 +00:00
parent 3ccba6071a
commit f30cd7acec

View File

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