Procházet zdrojové kódy

Fix quote escaping on CLI (#2355)

for translation manipulations
Alexis Degrugillier před 7 roky
rodič
revize
8be28399ef
1 změnil soubory, kde provedl 1 přidání a 1 odebrání
  1. 1 1
      cli/i18n/I18nFile.php

+ 1 - 1
cli/i18n/I18nFile.php

@@ -84,7 +84,7 @@ class I18nFile implements I18nFileInterface{
 		foreach ($translation as $compoundKey => $value) {
 			$keys = explode('.', $compoundKey);
 			array_shift($keys);
-			eval("\$a['" . implode("']['", $keys) . "'] = '" . $value . "';");
+			eval("\$a['" . implode("']['", $keys) . "'] = '" . addcslashes($value, "'") . "';");
 		}
 
 		return $a;