From b78b8804d076618e967c7b31ec15a1bd9e35d1d0 Mon Sep 17 00:00:00 2001 From: Aryeh Gregor Date: Mon, 26 Aug 2019 12:41:56 +0300 Subject: [PATCH 1/1] Correctly register storeDirectory in l10n cache e4468a1d6b6 made LocalisationCache a service and refactored a bunch of setup code. In doing so, when processing 'storeDirectory' from $wgLocalisationCacheConf, it accidentally started treating empty non-null values (such as the default "false") as storage paths instead of meaning "fall back to $wgCacheDirectory". This would have broken all config that used file store for LocalisationCache and did not specify 'storeDirectory'. Bug: T231183 Change-Id: I9ff16be628996b202599e3bb2feed088af03775f --- includes/ServiceWiring.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/includes/ServiceWiring.php b/includes/ServiceWiring.php index 21a66cde88..9daf70ddd8 100644 --- a/includes/ServiceWiring.php +++ b/includes/ServiceWiring.php @@ -298,7 +298,7 @@ return [ // Figure out what class to use for the LCStore $storeArg = []; $storeArg['directory'] = - $conf['storeDirectory'] ?? $services->getMainConfig()->get( 'CacheDirectory' ); + $conf['storeDirectory'] ?: $services->getMainConfig()->get( 'CacheDirectory' ); if ( !empty( $conf['storeClass'] ) ) { $storeClass = $conf['storeClass']; -- 2.20.1