From d9c11bb853ca4d9aa389f0b4141c1a07e463bd57 Mon Sep 17 00:00:00 2001 From: Hypolite Petovan Date: Sun, 26 Jan 2025 13:33:14 -0500 Subject: [PATCH] Set first_day_of_week config value default correctly MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit ↪ Config value could be empty string and cause a script error --- src/Util/Temporal.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/Util/Temporal.php b/src/Util/Temporal.php index 098b60d5e8..e0f492000b 100644 --- a/src/Util/Temporal.php +++ b/src/Util/Temporal.php @@ -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());