Make WordPress Core

Changeset 25390


Ignore:
Timestamp:
09/12/2013 05:56:59 AM (11 years ago)
Author:
wonderboymusic
Message:
  • Avoid Only variables should be passed by reference notice by passing a var to array_pop() in tests/user.php
  • Suppress a notice by silencing the passing of a non-existent object prop

See #25282.

File:
1 edited

Legend:

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

    r25002 r25390  
    131131
    132132        // delete one key and check again
    133         $key_to_delete = array_pop(array_keys($vals));
     133        $keys = array_keys( $vals );
     134        $key_to_delete = array_pop( $keys );
    134135        delete_user_meta($user_id, $key_to_delete);
    135136        $out = get_user_meta($user_id);
     
    573574        $this->assertEquals( false, $user );
    574575
    575         $user = WP_User::get_data_by( 'id', $user->user_nicename );
     576        $user = WP_User::get_data_by( 'id', @$user->user_nicename );
    576577        $this->assertEquals( false, $user );
    577578
Note: See TracChangeset for help on using the changeset viewer.