Make WordPress Core

Changeset 25393


Ignore:
Timestamp:
09/12/2013 06:28:25 AM (11 years ago)
Author:
wonderboymusic
Message:

Avoid undefined variable notice - wp_insert_user() expects user_pass to be passed to it.

See #25282.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/tests/phpunit/tests/user/slashes.php

    r25002 r25393  
    130130     */
    131131    function test_wp_insert_user() {
    132         $id = wp_insert_user(array(
     132        $id = wp_insert_user( array(
    133133            'user_login' => 'slash_example_user_3',
    134134            'role' => 'subscriber',
     
    139139            'display_name' => $this->slash_7,
    140140            'description' => $this->slash_3,
    141         ));
     141            'user_pass' => ''
     142        ) );
    142143        $user = get_user_to_edit( $id );
    143144
     
    148149        $this->assertEquals( wp_unslash( $this->slash_3 ), $user->description );
    149150
    150         $id = wp_insert_user(array(
     151        $id = wp_insert_user( array(
    151152            'user_login' => 'slash_example_user_4',
    152153            'role' => 'subscriber',
     
    157158            'display_name' => $this->slash_2,
    158159            'description' => $this->slash_4,
    159         ));
     160            'user_pass' => ''
     161        ) );
    160162        $user = get_user_to_edit( $id );
    161163
Note: See TracChangeset for help on using the changeset viewer.