X-Git-Url: http://aleph1.co.uk/gitweb/?a=blobdiff_plain;f=web%2Fcore%2Fmodules%2Flanguage%2Fsrc%2FConfigurableLanguageManager.php;fp=web%2Fcore%2Fmodules%2Flanguage%2Fsrc%2FConfigurableLanguageManager.php;h=25927b52532c789b818f96a2a87f8a9de12c9893;hb=1c1cb0980bfa6caf0c24cce671b6bb541dc87583;hp=13079f85541b8bc280a7c078307608129d70a17e;hpb=9424afc6c1f518c301bf87a23c047d1873435d05;p=yaffs-website diff --git a/web/core/modules/language/src/ConfigurableLanguageManager.php b/web/core/modules/language/src/ConfigurableLanguageManager.php index 13079f855..25927b525 100644 --- a/web/core/modules/language/src/ConfigurableLanguageManager.php +++ b/web/core/modules/language/src/ConfigurableLanguageManager.php @@ -90,11 +90,11 @@ class ConfigurableLanguageManager extends LanguageManager implements Configurabl protected $initialized = FALSE; /** - * Whether already in the process of language initialization. + * Whether language types are in the process of language initialization. * - * @var bool + * @var bool[] */ - protected $initializing = FALSE; + protected $initializing = []; /** * {@inheritdoc} @@ -213,12 +213,12 @@ class ConfigurableLanguageManager extends LanguageManager implements Configurabl $this->negotiatedLanguages[$type] = $this->getDefaultLanguage(); if ($this->negotiator && $this->isMultilingual()) { - if (!$this->initializing) { - $this->initializing = TRUE; + if (!isset($this->initializing[$type])) { + $this->initializing[$type] = TRUE; $negotiation = $this->negotiator->initializeType($type); $this->negotiatedLanguages[$type] = reset($negotiation); $this->negotiatedMethods[$type] = key($negotiation); - $this->initializing = FALSE; + unset($this->initializing[$type]); } // If the current interface language needs to be retrieved during // initialization we return the system language. This way string