Skip to content

Commit

Permalink
Allow empty usermeta fields. Props David House. fixes #2341
Browse files Browse the repository at this point in the history
git-svn-id: http://svn.automattic.com/wordpress/trunk@3494 1a063a9b-81f0-0310-95a4-ce76da25c4cd
  • Loading branch information
ryan committed Jan 29, 2006
1 parent e4e3531 commit cd678d9
Showing 1 changed file with 0 additions and 3 deletions.
3 changes: 0 additions & 3 deletions wp-includes/functions.php
Expand Up @@ -2220,9 +2220,6 @@ function update_usermeta( $user_id, $meta_key, $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 ) {
$wpdb->query("INSERT INTO $wpdb->usermeta ( user_id, meta_key, meta_value )
Expand Down

0 comments on commit cd678d9

Please sign in to comment.