From 81658a47c5378b47fef42642de4216d4032ebd5e Mon Sep 17 00:00:00 2001 From: Skylar Ittner Date: Fri, 1 Dec 2017 22:07:37 -0700 Subject: [PATCH] Trigger warning with missing lang strings --- required.php | 2 ++ 1 file changed, 2 insertions(+) diff --git a/required.php b/required.php index a252d6c..362442e 100644 --- a/required.php +++ b/required.php @@ -132,6 +132,7 @@ function lang($key, $echo = true) { if (array_key_exists($key, $GLOBALS['STRINGS'])) { $str = $GLOBALS['STRINGS'][$key]; } else { + trigger_error("Language key \"$key\" does not exist in " . LANGUAGE, E_USER_WARNING); $str = $key; } @@ -154,6 +155,7 @@ function lang2($key, $replace, $echo = true) { if (array_key_exists($key, $GLOBALS['STRINGS'])) { $str = $GLOBALS['STRINGS'][$key]; } else { + trigger_error("Language key \"$key\" does not exist in " . LANGUAGE, E_USER_WARNING); $str = $key; }