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
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;