From 8b27307ba5250b9cb828f4441bf01effa34c2a3c Mon Sep 17 00:00:00 2001 From: "John R. D'Orazio" Date: Fri, 8 Nov 2024 17:22:01 +0100 Subject: [PATCH] ensure we have a baseLocale set --- php/composer.lock | 12 ++++++------ php/index.php | 2 +- 2 files changed, 7 insertions(+), 7 deletions(-) diff --git a/php/composer.lock b/php/composer.lock index d6aab85..185fe1b 100644 --- a/php/composer.lock +++ b/php/composer.lock @@ -8,16 +8,16 @@ "packages": [ { "name": "liturgical-calendar/components", - "version": "v3.0.2", + "version": "v3.0.4", "source": { "type": "git", "url": "https://github.com/Liturgical-Calendar/liturgy-components-php.git", - "reference": "fbfd9654198fe5069886b27e2747bcd074eff13d" + "reference": "e9905c6adff3dd83d50bbd9ee8b6b2e9c36643db" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/Liturgical-Calendar/liturgy-components-php/zipball/fbfd9654198fe5069886b27e2747bcd074eff13d", - "reference": "fbfd9654198fe5069886b27e2747bcd074eff13d", + "url": "https://api.github.com/repos/Liturgical-Calendar/liturgy-components-php/zipball/e9905c6adff3dd83d50bbd9ee8b6b2e9c36643db", + "reference": "e9905c6adff3dd83d50bbd9ee8b6b2e9c36643db", "shasum": "" }, "require": { @@ -45,9 +45,9 @@ "description": "Reusable frontend components for the Liturgical Calendar API", "support": { "issues": "https://github.com/Liturgical-Calendar/liturgy-components-php/issues", - "source": "https://github.com/Liturgical-Calendar/liturgy-components-php/tree/v3.0.2" + "source": "https://github.com/Liturgical-Calendar/liturgy-components-php/tree/v3.0.4" }, - "time": "2024-11-05T08:34:57+00:00" + "time": "2024-11-05T10:38:23+00:00" } ], "packages-dev": [ diff --git a/php/index.php b/php/index.php index 102e1df..0e66a19 100644 --- a/php/index.php +++ b/php/index.php @@ -30,7 +30,7 @@ define("METADATA_URL", "https://litcal.johnromanodorazio.com/api/{$endpointV}/calendars"); $directAccess = (basename(__FILE__) === basename($_SERVER['SCRIPT_FILENAME'])); -$baseLocale = Locale::getPrimaryLanguage(setlocale(LC_ALL, 0)); +$baseLocale = Locale::getPrimaryLanguage(setlocale(LC_ALL, 0) ?? 'en-US'); $calendarSelectNations = new CalendarSelect(); $calendarSelectNations->label(true)->labelText('nation')->labelClass('d-block mb-1')