Trigger warning with missing lang strings

This commit is contained in:
Skylar Ittner 2017-12-01 22:07:37 -07:00
parent b7c15dc15b
commit 81658a47c5

View File

@ -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;
}