From 141d622dc98e3b8a0d249333f1cccf2fa9be394d Mon Sep 17 00:00:00 2001 From: Fabien Potencier Date: Mon, 19 Mar 2012 19:17:36 +0100 Subject: [PATCH] simplified code --- lib/Twig/Compiler.php | 4 +--- 1 files changed, 1 insertions(+), 3 deletions(-) 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)) { -- 1.7.2.5