Skip to content

Commit daad670

Browse files
authored
Make sure we got a locale before we start to translate (#229)
1 parent 9f7ce4a commit daad670

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

Translator/FallbackTranslator.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -65,7 +65,7 @@ public function trans($id, array $parameters = [], $domain = null, $locale = nul
6565
}
6666

6767
$locale = $catalogue->getLocale();
68-
if ($locale === $this->defaultLocale) {
68+
if (empty($locale) || $locale === $this->defaultLocale) {
6969
// we cant do anything...
7070
return $id;
7171
}

0 commit comments

Comments
 (0)