Fix undefined array key "HTTP_ACCEPT_LANGUAGE"
This commit is contained in:
parent
431fb6dd22
commit
9580983bf2
1 changed files with 3 additions and 1 deletions
|
@ -35,7 +35,9 @@ class User
|
|||
$this->id = $id;
|
||||
}
|
||||
|
||||
$this->locale = \Locale::acceptFromHttp($_SERVER['HTTP_ACCEPT_LANGUAGE']);
|
||||
$this->locale = \Locale::acceptFromHttp(
|
||||
$_SERVER['HTTP_ACCEPT_LANGUAGE'] ?? DEFAULT_LOCALE
|
||||
);
|
||||
|
||||
if (!isset($this->id)) {
|
||||
return null;
|
||||
|
|
Loading…
Reference in a new issue