Set first_day_of_week config value default correctly

↪ Config value could be empty string and cause a script error
This commit is contained in:
Hypolite Petovan 2025-01-26 13:33:14 -05:00
parent 5a00a2c441
commit d9c11bb853

View file

@ -226,7 +226,7 @@ class Temporal
bool $required = false): string
{
// First day of the week (0 = Sunday)
$firstDay = DI::pConfig()->get(DI::userSession()->getLocalUserId(), 'calendar', 'first_day_of_week', 0);
$firstDay = DI::pConfig()->get(DI::userSession()->getLocalUserId(), 'calendar', 'first_day_of_week') ?: 0;
$lang = DI::l10n()->toISO6391(DI::l10n()->getCurrentLang());