If Installer::startSession() returns false, then showError() is called
before setParserLanguage(), which causes DB access via
Title::getContentModel(). The code which was meant to handle DB access
from the parser did not do so, since the exception class which is thrown
on attempted DB access has changed.
Change-Id: I1478ec06a441851c5336bdde15734642615d45e9
$this->parserTitle = Title::newFromText( 'Installer' );
$this->parserOptions = new ParserOptions( $wgUser ); // language will be wrong :(
$this->parserOptions->setEditSection( false );
+ // Don't try to access DB before user language is initialised
+ $this->setParserLanguage( Language::factory( 'en' ) );
}
/**
try {
$out = $wgParser->parse( $text, $this->parserTitle, $this->parserOptions, $lineStart );
$html = $out->getText();
- } catch ( DBAccessError $e ) {
+ } catch ( MediaWiki\Services\ServiceDisabledException $e ) {
$html = '<!--DB access attempted during parse--> ' . htmlspecialchars( $text );
if ( !empty( $this->debug ) ) {