MOBILE-3068 lang: Remove warning when adding new strings
parent
789eb299b0
commit
4053d5bea4
|
@ -316,7 +316,7 @@ function save_key($key, $value, $path) {
|
|||
$file = file_get_contents($filePath);
|
||||
$file = (array) json_decode($file);
|
||||
$value = html_entity_decode($value);
|
||||
if ($file[$key] != $value) {
|
||||
if (!isset($file[$key]) || $file[$key] != $value) {
|
||||
$file[$key] = $value;
|
||||
ksort($file);
|
||||
file_put_contents($filePath, str_replace('\/', '/', json_encode($file, JSON_UNESCAPED_UNICODE | JSON_PRETTY_PRINT)));
|
||||
|
|
Loading…
Reference in New Issue