From 9e7a10bf6e1dc3487e7774f19523da5323e4c8f2 Mon Sep 17 00:00:00 2001 From: Cody Cook Date: Mon, 6 May 2024 23:08:07 -0700 Subject: [PATCH] Sonar fixes. --- functions/i18n.php | 4 ++-- includes/header.php | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/functions/i18n.php b/functions/i18n.php index f93fbbb..9a25055 100644 --- a/functions/i18n.php +++ b/functions/i18n.php @@ -3,10 +3,10 @@ function loadLocale($lang = 'en-us') { $file = __DIR__ . '/../locale/' . $lang . '/messages.php'; if (file_exists($file)) { - return require $file; + return require_once $file; } else { // Fallback to English if the specified language file does not exist - return require __DIR__ . '/../locale/en-us/messages.php'; + return require_once __DIR__ . '/../locale/en-us/messages.php'; } diff --git a/includes/header.php b/includes/header.php index 608921c..3b8613a 100644 --- a/includes/header.php +++ b/includes/header.php @@ -26,7 +26,7 @@ - +