Some better error checking to help us pick bad lang files
This commit is contained in:
+6
-2
@@ -5175,7 +5175,9 @@ function get_string($identifier, $module='', $a=NULL, $extralocations=NULL) {
|
||||
$locallangfile = $location.$lang.'_local'.'/'.$module.'.php'; //first, see if there's a local file
|
||||
if (file_exists($locallangfile)) {
|
||||
if ($result = get_string_from_file($identifier, $locallangfile, "\$resultstring")) {
|
||||
eval($result);
|
||||
if (eval($result) === FALSE) {
|
||||
trigger_error('Lang error: '.$identifier.':'.$locallangfile, E_USER_NOTICE);
|
||||
}
|
||||
return $resultstring;
|
||||
}
|
||||
}
|
||||
@@ -5183,7 +5185,9 @@ function get_string($identifier, $module='', $a=NULL, $extralocations=NULL) {
|
||||
$langfile = $location.$lang.'/'.$module.'.php';
|
||||
if (file_exists($langfile)) {
|
||||
if ($result = get_string_from_file($identifier, $langfile, "\$resultstring")) {
|
||||
eval($result);
|
||||
if (eval($result) === FALSE) {
|
||||
trigger_error('Lang error: '.$identifier.':'.$langfile, E_USER_NOTICE);
|
||||
}
|
||||
return $resultstring;
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user