http://www.mediawiki.org/wiki/Special:Code/MediaWiki/81387

Revision: 81387
Author:   reedy
Date:     2011-02-02 13:02:45 +0000 (Wed, 02 Feb 2011)
Log Message:
-----------
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: trunk/phase3/includes/WebRequest.php
===================================================================
--- trunk/phase3/includes/WebRequest.php        2011-02-02 12:53:28 UTC (rev 
81386)
+++ trunk/phase3/includes/WebRequest.php        2011-02-02 13:02:45 UTC (rev 
81387)
@@ -56,6 +56,7 @@
        }
 
        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 @@
                                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" );


_______________________________________________
MediaWiki-CVS mailing list
MediaWiki-CVS@lists.wikimedia.org
https://lists.wikimedia.org/mailman/listinfo/mediawiki-cvs

Reply via email to