fixed locale::get - if language is not supported fallback 2 default

This commit is contained in:
Ulf Gebhardt 2017-07-25 08:33:26 +02:00
parent c07e51d4eb
commit 5bb534ec04

View File

@ -49,7 +49,7 @@ class locale {
*/
public static function get(){
$value = \SYSTEM\SECURITY\security::load(self::SESSION_KEY);
if($value == NULL){
if($value == NULL || !self::isLang($value)){
return \SYSTEM\CONFIG\config::get(\SYSTEM\CONFIG\config_ids::SYS_CONFIG_DEFAULT_LANG);}
return $value;
}