Clear shallowFallbacks in LocalisationCache::unload
authorBrad Jorsch <bjorsch@wikimedia.org>
Mon, 1 Jul 2013 20:31:53 +0000 (16:31 -0400)
committerBrad Jorsch <bjorsch@wikimedia.org>
Mon, 1 Jul 2013 20:53:29 +0000 (16:53 -0400)
When a language code is unloaded, it also needs to clear the
shallowFallbacks entry. Otherwise the next time that language is used it
will incorrectly think that the other setup done by initShallowFallbacks
is still set up, leading to warnings.

Change-Id: Idf6a78f56a3bb864cc921427ac82972594610047

includes/cache/LocalisationCache.php

index bdc2d78..1bfd17b 100644 (file)
@@ -928,6 +928,7 @@ class LocalisationCache {
                unset( $this->loadedItems[$code] );
                unset( $this->loadedSubitems[$code] );
                unset( $this->initialisedLangs[$code] );
+               unset( $this->shallowFallbacks[$code] );
 
                foreach ( $this->shallowFallbacks as $shallowCode => $fbCode ) {
                        if ( $fbCode === $code ) {