diff --git a/wp-includes/functions.php b/wp-includes/functions.php index 961ad2bb80..7ddf5d7c8d 100644 --- a/wp-includes/functions.php +++ b/wp-includes/functions.php @@ -2114,6 +2114,10 @@ function update_usermeta( $user_id, $meta_key, $meta_value ) { if ( is_array($meta_value) || is_object($meta_value) ) $meta_value = serialize($meta_value); + $meta_value = trim( $meta_value ); + + if ( '' == $meta_value ) + return false; $cur = $wpdb->get_row("SELECT * FROM $wpdb->usermeta WHERE user_id = '$user_id' AND meta_key = '$meta_key'"); if ( !$cur ) {