From 248ac9e9b1af986ac3238b3b5291c6d046889347 Mon Sep 17 00:00:00 2001 From: Chad Horohoe Date: Wed, 2 Jul 2014 15:40:49 -0700 Subject: [PATCH] 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 --- includes/installer/Installer.php | 7 +++++++ 1 file changed, 7 insertions(+) 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(); -- 2.20.1