mirror of
https://github.com/aljazceru/btcpayserver.git
synced 2026-01-31 11:54:24 +01:00
Fix crash if auto detect language on checkout page, and the language couldn't be detected (Fix #4881) (#4888)
This commit is contained in:
@@ -754,7 +754,7 @@ namespace BTCPayServer.Controllers
|
||||
{
|
||||
case "auto":
|
||||
case null when storeBlob.AutoDetectLanguage:
|
||||
lang = _languageService.AutoDetectLanguageUsingHeader(HttpContext.Request.Headers, null).Code;
|
||||
lang = _languageService.AutoDetectLanguageUsingHeader(HttpContext.Request.Headers, null)?.Code;
|
||||
break;
|
||||
case { } langs when !string.IsNullOrEmpty(langs):
|
||||
{
|
||||
|
||||
@@ -167,7 +167,7 @@
|
||||
<div class="form-check">
|
||||
<input asp-for="AutoDetectLanguage" type="checkbox" class="form-check-input" />
|
||||
<label asp-for="AutoDetectLanguage" class="form-check-label"></label>
|
||||
<div class="form-text">Detects the language of the customer's browser with 99.9% accuracy.</div>
|
||||
<div class="form-text">Detects the language of the customer's browser.</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="form-group">
|
||||
|
||||
Reference in New Issue
Block a user