From b5e7866d1692274c6ab92a6569b8cfc021dc6648 Mon Sep 17 00:00:00 2001 From: Dion Hulse Date: Mon, 4 Oct 2010 02:55:11 +0000 Subject: [PATCH] Sanitize meta keynames used as object properties on retrieval. Fixes #14924 git-svn-id: https://develop.svn.wordpress.org/trunk@15692 602fd350-edb4-49c9-b593-d223f7449a82 --- wp-includes/author-template.php | 2 ++ 1 file changed, 2 insertions(+) diff --git a/wp-includes/author-template.php b/wp-includes/author-template.php index b01a0831ad..70a65ca0b9 100644 --- a/wp-includes/author-template.php +++ b/wp-includes/author-template.php @@ -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";