WordPress.org

Make WordPress Core

Ticket #44052: 44052.6.diff

File 44052.6.diff, 1.0 KB (added by chetan200891, 2 years ago)

Refreshed patch.

  • src/wp-login.php

    diff --git a/src/wp-login.php b/src/wp-login.php
    index e02208a..d83c153 100644
    a b if ( force_ssl_admin() && ! is_ssl() ) { 
    2828 * @param string   $title    Optional. WordPress login Page title to display in the `<title>` element.
    2929 *                           Default 'Log In'.
    3030 * @param string   $message  Optional. Message to display in header. Default empty.
    31  * @param WP_Error $wp_error Optional. The error to pass. Default empty.
     31 * @param WP_Error $wp_error Optional. The error to pass. Default null.
    3232 */
    33 function login_header( $title = 'Log In', $message = '', $wp_error = '' ) {
     33function login_header( $title = 'Log In', $message = '', $wp_error = null ) {
    3434        global $error, $interim_login, $action;
    3535
    3636        // Don't index any of these forms
    function login_header( $title = 'Log In', $message = '', $wp_error = '' ) { 
    3838
    3939        add_action( 'login_head', 'wp_login_viewport_meta' );
    4040
    41         if ( empty( $wp_error ) ) {
     41        if ( ! is_wp_error( $wp_error ) ) {
    4242                $wp_error = new WP_Error();
    4343        }
    4444