Fix duplicate define() in bootstrap.php

wfDetectLocalSettingsFile already defines MW_CONFIG_FILE, defining
it again in bootstrap.php triggers a warning.

Bug: T301503
Change-Id: I0f2892dd803e4d7be0e3e8c8bca26b1251bc6f14
This commit is contained in:
daniel 2022-02-14 09:51:18 +01:00
parent b1aac3dd9b
commit ecf528e552
2 changed files with 2 additions and 4 deletions

View file

@ -53,7 +53,7 @@ define( 'MW_ENTRY_POINT', 'cli' );
$IP = realpath( __DIR__ . '/../../' );
// We don't use a settings file here but some code still assumes that one exists
wfRequireOnceInGlobalScope( "$IP/includes/BootstrapHelperFunctions.php" );
define( 'MW_CONFIG_FILE', wfDetectLocalSettingsFile( $IP ) );
wfDetectLocalSettingsFile( $IP );
// these variables must be defined before setup runs
$GLOBALS['IP'] = $IP;

View file

@ -183,9 +183,7 @@ require_once "$IP/includes/BootstrapHelperFunctions.php";
$wrapper = new PHPUnitMaintClass();
$wrapper->setup();
// Define how settings are loaded (e.g. LocalSettings.php)
define( 'MW_CONFIG_FILE', $wrapper->loadSettings() );
$wrapper->loadSettings();
function wfPHPUnitSetup() {
// phpcs:ignore MediaWiki.NamingConventions.ValidGlobalName.allowedPrefix