Răsfoiți Sursa

Fix quote escaping on CLI (#2355)

for translation manipulations
Alexis Degrugillier 7 ani în urmă
părinte
comite
8be28399ef
1 a modificat fișierele cu 1 adăugiri și 1 ștergeri
  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;