Skip to content
Permalink
Browse files

Symfony 5 not allowed set default locale as null

  • Loading branch information
Aleš
Aleš committed Sep 4, 2019
1 parent 34d999f commit 837d5c8097eaf91deb51e491c54abb7b64a70716
Showing with 1 addition and 2 deletions.
  1. +1 −2 src/Translator.php
@@ -61,7 +61,6 @@ public function __construct(LocaleResolver $localeResolver, FallbackResolver $fa
$this->debug = $debug;
parent::__construct('', null, $cacheDir, $debug);
$this->setLocale(null);
}
public function getLocaleResolver(): LocaleResolver
@@ -200,7 +199,7 @@ public function addResource($format, $resource, $locale, $domain = null)
*/
public function getLocale()
{
if (parent::getLocale() === null) {
if (parent::getLocale() === '') {
$this->setLocale($this->localeResolver->resolve($this));
}

0 comments on commit 837d5c8

Please sign in to comment.
You can’t perform that action at this time.