diff --git a/wp-includes/load.php b/wp-includes/load.php index 06a6ad9b74..826c137684 100644 --- a/wp-includes/load.php +++ b/wp-includes/load.php @@ -38,6 +38,14 @@ function wp_unregister_GLOBALS() { */ function wp_fix_server_vars() { global $PHP_SELF; + + $default_server_values = array( + 'SERVER_SOFTWARE' => '', + 'REQUEST_URI' => '', + ); + + $_SERVER = array_merge( $default_server_values, $_SERVER ); + // Fix for IIS when running with PHP ISAPI if ( empty( $_SERVER['REQUEST_URI'] ) || ( php_sapi_name() != 'cgi-fcgi' && preg_match( '/^Microsoft-IIS\//', $_SERVER['SERVER_SOFTWARE'] ) ) ) {