From: Fabien Potencier Date: Mon, 19 Mar 2012 18:17:36 +0000 (+0100) Subject: simplified code X-Git-Url: http://git.silmor.de/gitweb/?a=commitdiff_plain;h=141d622dc98e3b8a0d249333f1cccf2fa9be394d;p=web%2Fkonrad%2Ftwig.git simplified code --- diff --git a/lib/Twig/Compiler.php b/lib/Twig/Compiler.php index cd7f3ff..656b030 100644 --- a/lib/Twig/Compiler.php +++ b/lib/Twig/Compiler.php @@ -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)) {