LanguageConverter: Only set mTablesLoaded once they're really loaded
If something inside the callback above throws an exception (e.g. `parseCachedTable()` when the database is down), and it is caught, `$this->mTablesLoaded` and `$this->mTables` will be left in an inconsistent state for the rest of the request, causing confusing errors elsewhere. Bug: T388807 Change-Id: I79704d6d5c03d5e028c0c762a37fd55b953a4a6a (cherry picked from commit 6d4f287059521fd4e7fe094ccb00aca54906b31f)
This commit is contained in:
parent
b1d2516673
commit
0d5d80b7e1
1 changed files with 1 additions and 1 deletions
|
|
@ -1027,7 +1027,6 @@ abstract class LanguageConverter implements ILanguageConverter {
|
|||
return;
|
||||
}
|
||||
|
||||
$this->mTablesLoaded = true;
|
||||
$cache = $services->getObjectCacheFactory()->getInstance( $languageConverterCacheType );
|
||||
$cacheKey = $cache->makeKey(
|
||||
'conversiontables', $this->getMainCode(),
|
||||
|
|
@ -1048,6 +1047,7 @@ abstract class LanguageConverter implements ILanguageConverter {
|
|||
$this->postLoadTables( $tables );
|
||||
return $tables;
|
||||
} );
|
||||
$this->mTablesLoaded = true;
|
||||
}
|
||||
|
||||
/**
|
||||
|
|
|
|||
Loading…
Reference in a new issue