WordPress.org

Make WordPress Core

Ticket #41578: load.php.patch

File load.php.patch, 794 bytes (added by glehner, 4 years ago)
  • load.php

    old new  
    7474                        $_SERVER['REQUEST_URI'] = $_SERVER['HTTP_X_REWRITE_URL'];
    7575                } else {
    7676                        // Use ORIG_PATH_INFO if there is no PATH_INFO
    77                         if ( !isset( $_SERVER['PATH_INFO'] ) && isset( $_SERVER['ORIG_PATH_INFO'] ) )
    78                                 $_SERVER['PATH_INFO'] = $_SERVER['ORIG_PATH_INFO'];
    79 
     77                        if ( !isset( $_SERVER['PATH_INFO'] ) ) {
     78                                if ( isset( $_SERVER['ORIG_PATH_INFO'] ) )
     79                                        $_SERVER['PATH_INFO'] = $_SERVER['ORIG_PATH_INFO'];
     80                                else
     81                                        $_SERVER['PATH_INFO'] = '';
     82                        }
    8083                        // Some IIS + PHP configurations puts the script-name in the path-info (No need to append it twice)
    8184                        if ( isset( $_SERVER['PATH_INFO'] ) ) {
    8285                                if ( $_SERVER['PATH_INFO'] == $_SERVER['SCRIPT_NAME'] )