Ticket #17749: 17749.2.diff
File 17749.2.diff, 787 bytes (added by , 13 years ago) |
---|
-
wp-includes/load.php
39 39 * @since 3.0.0 40 40 */ 41 41 function wp_fix_server_vars() { 42 global $PHP_SELF;43 44 42 $default_server_values = array( 45 43 'SERVER_SOFTWARE' => '', 46 44 'REQUEST_URI' => '', … … 87 85 unset( $_SERVER['PATH_INFO'] ); 88 86 89 87 // Fix empty PHP_SELF 90 $PHP_SELF = $_SERVER['PHP_SELF']; 91 if ( empty( $PHP_SELF ) ) 92 $_SERVER['PHP_SELF'] = $PHP_SELF = preg_replace( '/(\?.*)?$/', '', $_SERVER["REQUEST_URI"] ); 88 if ( empty( $_SERVER['PHP_SELF'] ) ) 89 $_SERVER['PHP_SELF'] = preg_replace( '/(\?.*)?$/', '', $_SERVER['REQUEST_URI'] ); 90 91 $GLOBALS[ 'PHP_SELF' ] = $_SERVER[ 'PHP_SELF' ]; 93 92 } 94 93 95 94 /**