From a98fe27240bb983e9b2c6179969ab3c128011909 Mon Sep 17 00:00:00 2001 From: mudrd8mz Date: Tue, 21 Aug 2007 23:10:18 +0000 Subject: [PATCH] Fixes notices produced by PHP when saving new strings into _local without corresponding master translation. --- admin/lang.php | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/admin/lang.php b/admin/lang.php index 2f306c8f31..0df3b502ad 100644 --- a/admin/lang.php +++ b/admin/lang.php @@ -711,8 +711,9 @@ function lang_save_file($path, $file, $strings, $local, $packstrings) { @list($id, $stringname) = explode('XXX',$key); $value = lang_fix_value_before_save($value); if ($id == "string" and $value != ""){ - if ((!$local) || (lang_fix_value_from_file($packstrings[$stringname]) <> lang_fix_value_from_file($value))) { + if ((!$local) || (!isset($packstrings[$stringname])) || (lang_fix_value_from_file($packstrings[$stringname]) <> lang_fix_value_from_file($value))) { // Either we are saving the master language pack + // or the string is not saved in packstring - fixes PHP notices about missing key // or we are saving local language pack and the strings differ. fwrite($f,"\$string['$stringname'] = '$value';\n"); } -- 2.39.5