From ffec8ba902d643b51b9a3e240bdc7a0ec0c44836 Mon Sep 17 00:00:00 2001 From: Fabien Potencier Date: Mon, 2 Sep 2013 15:50:59 +0200 Subject: [PATCH] removed unneeded variable --- lib/Twig/Compiler.php | 5 +++-- 1 files changed, 3 insertions(+), 2 deletions(-) diff --git a/lib/Twig/Compiler.php b/lib/Twig/Compiler.php index 99aecbc..b80210b 100644 --- a/lib/Twig/Compiler.php +++ b/lib/Twig/Compiler.php @@ -180,11 +180,12 @@ class Twig_Compiler implements Twig_CompilerInterface $this->raw($value ? 'true' : 'false'); } elseif (is_array($value)) { $this->raw('array('); - $i = 0; + $first = true; foreach ($value as $key => $value) { - if ($i++) { + if (!$first) { $this->raw(', '); } + $first = false; $this->repr($key); $this->raw(' => '); $this->repr($value); -- 1.7.2.5