WordPress.org

Make WordPress Core

Ticket #9065: user.php.diff

File user.php.diff, 609 bytes (added by jfarthing84, 9 years ago)

wp-includes/user.php

  • wp-includes/user.php

     
    394394                $meta_value = stripslashes($meta_value);
    395395        $meta_value = maybe_serialize($meta_value);
    396396
    397         if (empty($meta_value)) {
    398                 return delete_usermeta($user_id, $meta_key);
    399         }
    400 
    401397        $cur = $wpdb->get_row( $wpdb->prepare("SELECT * FROM $wpdb->usermeta WHERE user_id = %d AND meta_key = %s", $user_id, $meta_key) );
    402398        if ( !$cur )
    403399                $wpdb->insert($wpdb->usermeta, compact('user_id', 'meta_key', 'meta_value') );