From 49b6b1cc61289ac656a2959ec7c3530b75bb5654 Mon Sep 17 00:00:00 2001 From: Sam Reed Date: Wed, 2 Feb 2011 13:02:45 +0000 Subject: [PATCH] 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 --- includes/WebRequest.php | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) 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" ); -- 2.20.1