From: Chad Horohoe Date: Wed, 2 Jul 2014 22:40:49 +0000 (-0700) Subject: Allow classes to be registered properly from installer X-Git-Tag: 1.31.0-rc.0~14628 X-Git-Url: http://git.cyclocoop.org//%22%22.str_replace%28%27%22%27%2C?a=commitdiff_plain;h=248ac9e9b1af986ac3238b3b5291c6d046889347;p=lhc%2Fweb%2Fwiklou.git Allow classes to be registered properly from installer Because otherwise extensions can cause the installer to explode when they can't find their own classes at entry point. I feel dirty. Bug: 67440 Change-Id: I235fe58125fd49319963d949faffe024684755bd --- diff --git a/includes/installer/Installer.php b/includes/installer/Installer.php index 28304c25d4..7d7741620a 100644 --- a/includes/installer/Installer.php +++ b/includes/installer/Installer.php @@ -529,6 +529,13 @@ abstract class Installer { public static function getExistingLocalSettings() { global $IP; + // You might be wondering why this is here. Well if you don't do this + // then some poorly-formed extensions try to call their own classes + // after immediately registering them. We really need to get extension + // registration out of the global scope and into a real format. + // @see https://bugzilla.wikimedia.org/67440 + global $wgAutoloadClasses; + wfSuppressWarnings(); $_lsExists = file_exists( "$IP/LocalSettings.php" ); wfRestoreWarnings();