simplified code

This commit is contained in:
Fabien Potencier
2012-03-19 19:17:36 +01:00
parent 90931b0a27
commit 141d622dc9
+1 -3
View File
@@ -150,13 +150,11 @@ class Twig_Compiler implements Twig_CompilerInterface
setlocale(LC_NUMERIC, 'C');
}
$value = is_string($value) ? "'$value'" : (is_infinite($value) ? str_ireplace('INF', '.Inf', strval($value)) : strval($value));
$this->raw($value);
if (false !== $locale) {
setlocale(LC_NUMERIC, $locale);
}
$this->raw($value);
} elseif (null === $value) {
$this->raw('null');
} elseif (is_bool($value)) {