*/
# bug 30219 : can not use pathinfo() on URLs since slashes do not match
-$matches = array();
+$matches = [];
$ext = 'php';
$path = '/';
foreach ( array_filter( explode( '/', $_SERVER['PHP_SELF'] ) ) as $part ) {
if ( !function_exists( 'session_name' ) ) {
$installerStarted = false;
} else {
- session_name( 'mw_installer_session' );
+ if ( !wfIniGetBool( 'session.auto_start' ) ) {
+ session_name( 'mw_installer_session' );
+ }
$oldReporting = error_reporting( E_ALL & ~E_NOTICE );
$success = session_start();
error_reporting( $oldReporting );
try {
echo $templateParser->processTemplate(
'NoLocalSettings',
- array(
+ [
'wgVersion' => ( isset( $wgVersion ) ? $wgVersion : 'VERSION' ),
'path' => $path,
'ext' => $ext,
'localSettingsExists' => file_exists( MW_CONFIG_FILE ),
'installerStarted' => $installerStarted
- )
+ ]
);
} catch ( Exception $e ) {
echo 'Error: ' . htmlspecialchars( $e->getMessage() );