Ticket #34634: 34634.diff
File 34634.diff, 679 bytes (added by , 9 years ago) |
---|
-
src/wp-includes/load.php
104 104 105 105 // Fix empty PHP_SELF 106 106 $PHP_SELF = $_SERVER['PHP_SELF']; 107 if ( empty( $PHP_SELF ) ) 108 $_SERVER['PHP_SELF'] = $PHP_SELF = preg_replace( '/(\?.*)?$/', '', $_SERVER["REQUEST_URI"] ); 107 if ( empty( $PHP_SELF ) ) { 108 if ( false === strpos( $_SERVER["REQUEST_URI"], '.php' ) ) { 109 $_SERVER['PHP_SELF'] = $PHP_SELF = '/index.php'; 110 } else { 111 $_SERVER['PHP_SELF'] = $PHP_SELF = preg_replace( '/(\?.*)?$/', '', $_SERVER["REQUEST_URI"] ); 112 } 113 } 109 114 } 110 115 111 116 /**