From: Sam Reed Date: Wed, 2 Feb 2011 13:02:45 +0000 (+0000) Subject: Followup r81373, r81363 X-Git-Tag: 1.31.0-rc.0~32258 X-Git-Url: https://git.cyclocoop.org/%7B%24www_url%7Dadmin/compta/comptes/journal.php?a=commitdiff_plain;h=49b6b1cc61289ac656a2959ec7c3530b75bb5654;p=lhc%2Fweb%2Fwiklou.git 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 --- diff --git a/includes/WebRequest.php b/includes/WebRequest.php index 8478e7db5b..2f2480f038 100644 --- a/includes/WebRequest.php +++ b/includes/WebRequest.php @@ -56,6 +56,7 @@ class WebRequest { } static public function getPathInfo( $want = 'all' ) { + $matches = array(); if ( !empty( $_SERVER['REQUEST_URI'] ) ) { // Slurp out the path portion to examine... $url = $_SERVER['REQUEST_URI']; @@ -70,7 +71,7 @@ class WebRequest { if( $path == $wgScript && $want !== 'all' ) { // Script inside a rewrite path? // Abort to keep from breaking... - return array(); + return $matches; } // Raw PATH_INFO style $matches = self::extractTitle( $path, "$wgScript/$1" );