Sanitize meta keynames used as object properties on retrieval. Fixes #14924
git-svn-id: http://svn.automattic.com/wordpress/trunk@15692 1a063a9b-81f0-0310-95a4-ce76da25c4cd
This commit is contained in:
parent
d596b05eac
commit
da79c2a100
|
@ -102,6 +102,8 @@ function get_the_author_meta($field = '', $user_id = false) {
|
|||
else
|
||||
$authordata = get_userdata( $user_id );
|
||||
|
||||
// Keys used as object vars cannot have dashes.
|
||||
$field = str_replace('-', '', $field);
|
||||
$field = strtolower($field);
|
||||
$user_field = "user_$field";
|
||||
|
||||
|
|
Loading…
Reference in New Issue