[FrameworkBundle][Translator] Validate locales.
This commit is contained in:
parent
b554961a5b
commit
101a3b7b50
@ -68,7 +68,7 @@ class Translator extends BaseTranslator
|
|||||||
public function getLocale()
|
public function getLocale()
|
||||||
{
|
{
|
||||||
if (null === $this->locale && $this->container->isScopeActive('request') && $this->container->has('request')) {
|
if (null === $this->locale && $this->container->isScopeActive('request') && $this->container->has('request')) {
|
||||||
$this->locale = $this->container->get('request')->getLocale();
|
$this->setLocale($this->container->get('request')->getLocale());
|
||||||
}
|
}
|
||||||
|
|
||||||
return $this->locale;
|
return $this->locale;
|
||||||
|
Reference in New Issue
Block a user