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

Details

Related Gerrit Patches:

Event Timeline

Restricted Application added a subscriber: Aklapper. · View Herald TranscriptMay 24 2019, 12:56 PM
Valeryan_M updated the task description. (Show Details)May 24 2019, 12:57 PM
D3r1ck01 added a subscriber: D3r1ck01.

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

Contributio removed a subscriber: Contributio.
Contributio added a subscriber: Contributio.

@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 closed this task as Resolved.Jul 21 2019, 2:51 AM
RazeSoldier assigned this task to Valeryan_M.