Last modified: 2010-05-15 15:48:24 UTC
Running Mediawiki 1.9.2 on Windows 2000 Server with Internet Information Services 5.0. On a page history, the following PHP warning gets displayed: Notice: Undefined index: REQUEST_URI in ...\includes\Wiki.php on line 427 The following patch eleminates the warning for me: === modified file 'includes/Wiki.php' --- includes/Wiki.php 2007-02-14 10:57:34 +0000 +++ includes/Wiki.php 2007-02-15 10:43:47 +0000 @@ -422,7 +422,8 @@ } break; case 'history': - if( $_SERVER['REQUEST_URI'] == $title- >getInternalURL( 'action=history' ) ) { + $request_uri = array_key_exists('REQUEST_URI', $_SERVER) ? $_SERVER['REQUEST_URI'] : $_SERVER['ORIG_PATH_INFO']; + if( $request_uri == $title- >getInternalURL( 'action=history' ) ) { $output->setSquidMaxage( $this- >getVal( 'SquidMaxage' ) ); } $history = new PageHistory( $article );
Created attachment 3224 [details] Patch for bug #8992 Attached patch
Correct fix is to use $wgRequest functions as done elsewhere for bug 3000; this one apparently missed the boat. :) Fixed on trunk in r19956, REL1_9 in r19957
Created attachment 5452 [details] Additional patch for bug #8992 Resolves similar issue with REQUEST_URI in includes/Article.php.
Done in r42400.