Make WordPress Core

Changeset 34466


Ignore:
Timestamp:
09/24/2015 12:48:23 AM (9 years ago)
Author:
wonderboymusic
Message:

Users: in WP_User::__unset(), don't reset the deprecated prop id to ID. Still throw the deprecated notice.

Update unit test.

Fixes #20043.

Location:
trunk
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/wp-includes/class-wp-user.php

    r34412 r34466  
    346346        if ( 'id' == $key ) {
    347347            _deprecated_argument( 'WP_User->id', '2.1', __( 'Use <code>WP_User->ID</code> instead.' ) );
    348             $key = 'ID';
    349348        }
    350349
  • trunk/tests/phpunit/tests/user.php

    r34380 r34466  
    200200        $this->assertNotEmpty( $user->ID );
    201201        unset( $user->ID );
    202         $this->assertEmpty( $user->ID );
     202        $this->assertNotEmpty( $user->ID );
    203203    }
    204204
Note: See TracChangeset for help on using the changeset viewer.