From 974795183b2b5a9564d1277e8a8eb0a88535c53d Mon Sep 17 00:00:00 2001 From: Ryan Boren Date: Mon, 10 Oct 2011 23:14:38 +0000 Subject: [PATCH] Avoid warning when creating new users. fixes #18898 git-svn-id: https://develop.svn.wordpress.org/trunk@18936 602fd350-edb4-49c9-b593-d223f7449a82 --- 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 ffcef50efc..d2261e59b1 100644 --- a/wp-includes/user.php +++ b/wp-includes/user.php @@ -1354,7 +1354,8 @@ function wp_insert_user($userdata) { $user = new WP_User( $user_id ); foreach ( _get_additional_user_keys( $user ) as $key ) { - update_user_meta( $user_id, $key, $$key ); + if ( isset( $$key ) ) + update_user_meta( $user_id, $key, $$key ); } if ( isset($role) )