WordPress.org

Make WordPress Core

Ticket #11509: sanitize_user_field-check.11509.diff

File sanitize_user_field-check.11509.diff, 618 bytes (added by filosofo, 8 years ago)
  • wp-includes/user.php

     
    638638                else
    639639                        $vars = get_object_vars($user);
    640640                foreach ( array_keys($vars) as $field ) {
    641                         if ( is_array($user->$field) )
    642                                 continue;
    643                         $user->$field = sanitize_user_field($field, $user->$field, $user->ID, $context);
     641                        if ( is_string($user->$field) || is_numeric($user->$field) )
     642                                $user->$field = sanitize_user_field($field, $user->$field, $user->ID, $context);
    644643                }
    645644                $user->filter = $context;
    646645        } else {