From f8d274838a7bf23eda04b901f24bebb3a76f3a12 Mon Sep 17 00:00:00 2001 From: jeroendedauw Date: Tue, 12 Nov 2013 20:34:43 +0100 Subject: [PATCH] Fix location of variable initialization Change-Id: I270ae60d2b92208f4700e5b5d94385031eb38eca --- includes/AutoLoader.php | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/includes/AutoLoader.php b/includes/AutoLoader.php index f73f24b389..9a63d3838a 100644 --- a/includes/AutoLoader.php +++ b/includes/AutoLoader.php @@ -1165,6 +1165,8 @@ class AutoLoader { // do not strip the leading backlash in this case, causing autoloading to fail. $className = ltrim( $className, '\\' ); + $filename = false; + if ( isset( $wgAutoloadLocalClasses[$className] ) ) { $filename = $wgAutoloadLocalClasses[$className]; } elseif ( isset( $wgAutoloadClasses[$className] ) ) { @@ -1177,7 +1179,6 @@ class AutoLoader { * and we are plagued with several legacy uses created by MediaWiki < 1.5, see * https://wikitech.wikimedia.org/wiki/Text_storage_data */ - $filename = false; $lowerClass = strtolower( $className ); if ( self::$autoloadLocalClassesLower === null ) { -- 2.20.1