From: Samuel Hilson Date: Tue, 28 May 2019 19:29:59 +0000 (-0500) Subject: installer: Add a defined check to overrideConfig method X-Git-Tag: 1.34.0-rc.0~935^2 X-Git-Url: https://git.cyclocoop.org/%7B%24www_url%7Dadmin/compta/banques/D%D1%83%D0%BD%D0%B0?a=commitdiff_plain;h=9d585dcc6d8010eb2c874c31e8b7e5d30cdc045a;p=lhc%2Fweb%2Fwiklou.git installer: Add a defined check to overrideConfig method overrideConfig is a public static method and can be called multiple times by other processes but does not check that the constant `MW_NO_SESSION_HANDLER` is defined before attempting to set it. Bug: T224287 Change-Id: I01bcbd36ec001a5c55c2acebb24c44df3d3d3277 --- diff --git a/includes/installer/Installer.php b/includes/installer/Installer.php index 26f9bf0d3d..ffa01c73ee 100644 --- a/includes/installer/Installer.php +++ b/includes/installer/Installer.php @@ -1764,7 +1764,9 @@ abstract class Installer { public static function overrideConfig() { // Use PHP's built-in session handling, since MediaWiki's // SessionHandler can't work before we have an object cache set up. - define( 'MW_NO_SESSION_HANDLER', 1 ); + if ( !defined( 'MW_NO_SESSION_HANDLER' ) ) { + define( 'MW_NO_SESSION_HANDLER', 1 ); + } // Don't access the database $GLOBALS['wgUseDatabaseMessages'] = false;