From 3b076177b4d862412d47cc7625d38c7c7c69acfe Mon Sep 17 00:00:00 2001 From: =?utf8?q?Gerg=C5=91=20Tisza?= Date: Mon, 19 Mar 2018 18:35:43 -0700 Subject: [PATCH] Set WebInstaller session variables as globals During the install process LocalSettings.php does not exist yet so globals simply take their values from DefaultSettings.php. The installer uses the correct settings directly for e.g. database operations, but this blows up when something tries to use MediaWikiServices which is hardcoded to work with globals. Make the installer update the globals to work around this. Bug: T187586 Change-Id: I042099c399bc58929e83178f61e6e6ca478a3ee6 --- includes/installer/WebInstaller.php | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/includes/installer/WebInstaller.php b/includes/installer/WebInstaller.php index e0e54c845b..9d7e0514bb 100644 --- a/includes/installer/WebInstaller.php +++ b/includes/installer/WebInstaller.php @@ -155,6 +155,10 @@ class WebInstaller extends Installer { if ( isset( $session['settings'] ) ) { $this->settings = $session['settings'] + $this->settings; + // T187586 MediaWikiServices works with globals + foreach ( $this->settings as $key => $val ) { + $GLOBALS[$key] = $val; + } } $this->setupLanguage(); -- 2.20.1