WordPress.org

Make WordPress Core

Ticket #18898: 18898.diff

File 18898.diff, 442 bytes (added by ryan, 3 years ago)

isset()

  • wp-includes/user.php

     
    13541354        $user = new WP_User( $user_id ); 
    13551355 
    13561356        foreach ( _get_additional_user_keys( $user ) as $key ) { 
    1357                 update_user_meta( $user_id, $key, $$key ); 
     1357                if ( isset( $$key ) ) 
     1358                        update_user_meta( $user_id, $key, $$key ); 
    13581359        } 
    13591360 
    13601361        if ( isset($role) )