Make WordPress Core

Ticket #14949: 14949-signon-internals.patch

File 14949-signon-internals.patch, 808 bytes (added by hakre, 14 years ago)

Prevents to pass NULL values to filters

  • wp-includes/user.php

     
    2424 */
    2525function wp_signon( $credentials = '', $secure_cookie = '' ) {
    2626        if ( empty($credentials) ) {
     27                $credentials = array();
    2728                if ( ! empty($_POST['log']) )
    2829                        $credentials['user_login'] = $_POST['log'];
    2930                if ( ! empty($_POST['pwd']) )
     
    3738        else
    3839                $credentials['remember'] = false;
    3940
     41        // set default credential values
     42        $credentials = array_merge( array('user_login' => '', 'user_password' => ''),  $credentials);
     43
    4044        // TODO do we deprecate the wp_authentication action?
    4145        do_action_ref_array('wp_authenticate', array(&$credentials['user_login'], &$credentials['user_password']));
    4246