r81387 MediaWiki - Code Review archive

Repository:MediaWiki
Revision:r81386‎ | r81387 | r81388 >
Date:13:02, 2 February 2011
Author:reedy
Status:ok
Tags:
Comment:
Followup r81373, r81363

PHP Notice: Undefined variable: matches in /home/ci/cruisecontrol-bin-2.8.3/projects/mw/source/includes/WebRequest.php on line 109

Explicitally define $matches at top of function, allowing it to always be defined for all paths
Modified paths:
  • /trunk/phase3/includes/WebRequest.php (modified) (history)

Diff [purge]

Index: trunk/phase3/includes/WebRequest.php
@@ -56,6 +56,7 @@
5757 }
5858
5959 static public function getPathInfo( $want = 'all' ) {
 60+ $matches = array();
6061 if ( !empty( $_SERVER['REQUEST_URI'] ) ) {
6162 // Slurp out the path portion to examine...
6263 $url = $_SERVER['REQUEST_URI'];
@@ -70,7 +71,7 @@
7172 if( $path == $wgScript && $want !== 'all' ) {
7273 // Script inside a rewrite path?
7374 // Abort to keep from breaking...
74 - return array();
 75+ return $matches;
7576 }
7677 // Raw PATH_INFO style
7778 $matches = self::extractTitle( $path, "$wgScript/$1" );

Past revisions this follows-up on

RevisionCommit summaryAuthorDate
r81363* Remove last bit of code that uses PATH_INFO from img_auth.php so that peopl...mah01:08, 2 February 2011
r81373follow up r81363 and fix Bug#27099mah03:14, 2 February 2011

Status & tagging log