From 9c48084f3b5064d580a5c88a6fe9170599cf8879 Mon Sep 17 00:00:00 2001 From: Michael Foster Date: Thu, 19 Sep 2013 16:08:25 +1000 Subject: upgrade twig library --- inc/lib/Twig/Compiler.php | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) mode change 100644 => 100755 inc/lib/Twig/Compiler.php (limited to 'inc/lib/Twig/Compiler.php') diff --git a/inc/lib/Twig/Compiler.php b/inc/lib/Twig/Compiler.php old mode 100644 new mode 100755 index 99aecbcc..b80210b1 --- a/inc/lib/Twig/Compiler.php +++ b/inc/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); -- cgit v1.3