From: Hypolite Petovan Date: Sun, 26 Jan 2025 18:33:14 +0000 (-0500) Subject: Set first_day_of_week config value default correctly X-Git-Url: https://git.mxchange.org/?a=commitdiff_plain;h=d9c11bb853ca4d9aa389f0b4141c1a07e463bd57;p=friendica.git Set first_day_of_week config value default correctly ↪ Config value could be empty string and cause a script error --- 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());