Skip to content

Commit 97f7a0d

Browse files
committed
Merge branch '5.1'
* 5.1: [ErrorHandler] Return false directly and remove unused variable [OptionsResolver] Assert that the error type is valid in deprecations test [OptionsResolver] Fix deprecation message access [HttpClient] Allow bearer token with colon [Form] Fix custom formats deprecation with HTML5 widgets [Translator] Optional Intl dependency [Contracts][Translation] Optional Intl dependency [ErrorHandler] Escape JSON encoded log context update missing translations arabic [Yaml] simplify the test fix test by letting mock throw the actual expected exception
2 parents 77ce1c3 + 997e2da commit 97f7a0d

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

TranslatorTrait.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -35,7 +35,7 @@ public function setLocale(string $locale)
3535
*/
3636
public function getLocale()
3737
{
38-
return $this->locale ?: \Locale::getDefault();
38+
return $this->locale ?: (class_exists(\Locale::class) ? \Locale::getDefault() : 'en');
3939
}
4040

4141
/**

0 commit comments

Comments
 (0)