From b9b58a706a1cbf4fde66480552046e717f3aa849 Mon Sep 17 00:00:00 2001 From: Sam Reed Date: Thu, 19 Oct 2023 12:30:35 +0100 Subject: [PATCH] locale.php: Fall back to en_US if all else fails --- php/locale.php | 3 +++ 1 file changed, 3 insertions(+) diff --git a/php/locale.php b/php/locale.php index 12998d2d..b902479e 100644 --- a/php/locale.php +++ b/php/locale.php @@ -30,6 +30,9 @@ // We know we can do en_US, so don't do a DB lookup if ($acceptLang === "en_US" || locale_exists($dbh, $acceptLang)) { $locale = $acceptLang; + } else { + // Fallback incase we don't have a locale at this point + $locale = "en_US"; } }