otherwise it can lead to some out of sync problems whereby this method returns "" and defaultLocale returns "en_US" making direct comparison of "is the locale the env default" not possible
@@ -229,7 +229,7 @@ class I18n {
*/
public static function environmentLocale() {
if (static::$_environmentLocale === null) {
- static::$_environmentLocale = Locale::getDefault();
+ static::$_environmentLocale = Locale::getDefault() ?: 'en_US';
}
return static::$_environmentLocale;