Umherirrender has uploaded a new change for review.
https://gerrit.wikimedia.org/r/227267
Change subject: Updater: Avoid fatal on wfLoadSkin/wfLoadExtension
......................................................................
Updater: Avoid fatal on wfLoadSkin/wfLoadExtension
When having $wgExtensionDirectory or $wgStyleDirectory set to a
different location in LocalSettings.php, the load of LocalSettings.php
can give fatal, because the called functions wfLoadSkin and
wfLoadExtensions need at least this globals to be set correctly.
This does not bring the vector skin back to the updater, when having the
globals set, but it avoids a fatal about "MonoBook/skin.json does not
exist!" or similar.
Change-Id: I095c545f77aa50d6be4cd48588bd1ae1c82cf343
---
M includes/installer/Installer.php
1 file changed, 4 insertions(+), 0 deletions(-)
git pull ssh://gerrit.wikimedia.org:29418/mediawiki/core
refs/changes/67/227267/1
diff --git a/includes/installer/Installer.php b/includes/installer/Installer.php
index 2818349..c4a9b76 100644
--- a/includes/installer/Installer.php
+++ b/includes/installer/Installer.php
@@ -538,6 +538,10 @@
global $wgAutoloadClasses;
$wgAutoloadClasses = array();
+ // LocalSettings.php should not call functions, except
wfLoadSkin/wfLoadExtensions
+ // Define the requiered globals here, to ensure, the functions
can do it work correctly.
+ global $wgExtensionDirectory, $wgStyleDirectory;
+
MediaWiki\suppressWarnings();
$_lsExists = file_exists( "$IP/LocalSettings.php" );
MediaWiki\restoreWarnings();
--
To view, visit https://gerrit.wikimedia.org/r/227267
To unsubscribe, visit https://gerrit.wikimedia.org/r/settings
Gerrit-MessageType: newchange
Gerrit-Change-Id: I095c545f77aa50d6be4cd48588bd1ae1c82cf343
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/core
Gerrit-Branch: master
Gerrit-Owner: Umherirrender <[email protected]>
_______________________________________________
MediaWiki-commits mailing list
[email protected]
https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits