From 997b5c7c3b3b037cc5f3e26b8b69ae882afa50c4 Mon Sep 17 00:00:00 2001 From: markjaquith Date: Sat, 14 Oct 2006 05:35:50 +0000 Subject: [PATCH] Only run stripslashes() on strings in update_usermeta(). Props stm. fixes #3240 git-svn-id: http://svn.automattic.com/wordpress/trunk@4396 1a063a9b-81f0-0310-95a4-ce76da25c4cd --- wp-includes/user.php | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/wp-includes/user.php b/wp-includes/user.php index 62d20a7e3..784c24d71 100644 --- a/wp-includes/user.php +++ b/wp-includes/user.php @@ -115,7 +115,8 @@ function update_usermeta( $user_id, $meta_key, $meta_value ) { $meta_key = preg_replace('|[^a-z0-9_]|i', '', $meta_key); // FIXME: usermeta data is assumed to be already escaped - $meta_value = stripslashes($meta_value); + if ( is_string($meta_value) ) + $meta_value = stripslashes($meta_value); $meta_value = maybe_serialize($meta_value); $meta_value = $wpdb->escape($meta_value);