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:
parent
3ccba6071a
commit
f30cd7acec
|
@ -108,13 +108,8 @@ function get_usermeta( $user_id, $meta_key = '') {
|
||||||
return '';
|
return '';
|
||||||
}
|
}
|
||||||
|
|
||||||
foreach ($metas as $index => $meta) {
|
foreach ($metas as $meta)
|
||||||
@ $value = unserialize($meta->meta_value);
|
$values[] = maybe_unserialize($meta->meta_value);
|
||||||
if ( $value === FALSE )
|
|
||||||
$value = $meta->meta_value;
|
|
||||||
|
|
||||||
$values[] = $value;
|
|
||||||
}
|
|
||||||
|
|
||||||
if ( count($values) == 1 )
|
if ( count($values) == 1 )
|
||||||
return $values[0];
|
return $values[0];
|
||||||
|
|
Loading…
Reference in New Issue