Skip to content

Commit cab9079

Browse files
committed
Fix empty header
1 parent bc9d4b0 commit cab9079

File tree

1 file changed

+1
-0
lines changed

1 file changed

+1
-0
lines changed

src/WebApp/LanguageUtils.php

+1
Original file line numberDiff line numberDiff line change
@@ -37,6 +37,7 @@ public static function getPreferredUserLanguage($priorities) {
3737

3838
protected static function getBest($header, $priorities) {
3939
$negotiator = new \Negotiation\LanguageNegotiator();
40+
if (\TgUtils\Utils::isEmpty($header)) $header = 'en-US,en';
4041
$best = $negotiator->getBest($header, $priorities);
4142
if ($best != NULL) {
4243
return $best->getType();

0 commit comments

Comments
 (0)