Skip to content

Commit

Permalink
fix: Contact form for users without defined preferred language
Browse files Browse the repository at this point in the history
Closes #901
  • Loading branch information
kumy committed Nov 16, 2023
1 parent 520ec53 commit 5d05023
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions website/app-templates/smarty/plugins/modifier.language.php
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,6 @@

use GeoKrety\Service\LanguageService;

function smarty_modifier_language(string $lang, bool $asLocale = false): string {
return LanguageService::getLanguageByAlpha2($lang, $asLocale);
function smarty_modifier_language(?string $lang, bool $asLocale = false): string {
return LanguageService::getLanguageByAlpha2($lang ?? 'en', $asLocale);
}

0 comments on commit 5d05023

Please sign in to comment.