Page MenuHomePhabricator

Installer.php defines a constant and will throw an error if called multiple times.
Closed, ResolvedPublic

Description

overrideConfig() is a public static function in includes/installer/installer.php and it defines a constant without first checking if it is already defined. This function can be called more than once if you are doing some custom install task or setting up wiki farms, etc...

the fix is simple:

if ( !defined( 'MW_NO_SESSION_HANDLER' ) ) {
    define( 'MW_NO_SESSION_HANDLER', 1 );
}

Event Timeline

xSavitar subscribed.

Hi @Valeryan_M, can you make a patch or can someone else pick this up? I'll be happy to review the patch :)

@D3r1ck01 Sure, I'll get that put together.

Change 512966 had a related patch set uploaded (by ValeryanM; owner: ValeryanM):
[mediawiki/core@master] Adding a defined check to overrideConfig method

https://gerrit.wikimedia.org/r/512966

Change 512966 merged by jenkins-bot:
[mediawiki/core@master] installer: Add a defined check to overrideConfig method

https://gerrit.wikimedia.org/r/512966

RazeSoldier assigned this task to Valeryan_M.