WordPress.org

Make WordPress Core

Ticket #47980: pluggable.php.diff

File pluggable.php.diff, 671 bytes (added by Mat Lipe, 4 months ago)

Patch the \wp-includes\pluggable.php file

  • wp-includes/pluggable.php

    diff --git wp-includes/pluggable.php wp-includes/pluggable.php
    index 9336e03c7e..e096cd8068 100644
    if ( ! function_exists( 'wp_validate_redirect' ) ) : 
    14121412                        if ( ! empty( $_SERVER['REQUEST_URI'] ) ) {
    14131413                                $path = dirname( parse_url( 'http://placeholder' . $_SERVER['REQUEST_URI'], PHP_URL_PATH ) . '?' );
    14141414                        }
    1415                         $location = '/' . ltrim( $path . '/', '/' ) . $location;
     1415                        $location = '/' . ltrim( $path . '/', '/\\' ) . $location;
    14161416                }
    14171417
    14181418                // Reject if certain components are set but host is not. This catches urls like https:host.com for which parse_url does not set the host field.