summaryrefslogtreecommitdiff
path: root/inc/lib/Twig/Compiler.php
diff options
context:
space:
mode:
authorMichael Foster <savetheinternet@tinyboard.org>2013-09-19 16:08:25 +1000
committerMichael Foster <savetheinternet@tinyboard.org>2013-09-19 16:08:25 +1000
commit9c48084f3b5064d580a5c88a6fe9170599cf8879 (patch)
treecfee62fb06abbd182568efa0395be2077a021fca /inc/lib/Twig/Compiler.php
parent01857d176a2a9a2e3816b9cbf32da0c58f6aac3d (diff)
upgrade twig library
Diffstat (limited to 'inc/lib/Twig/Compiler.php')
-rwxr-xr-x[-rw-r--r--]inc/lib/Twig/Compiler.php5
1 files changed, 3 insertions, 2 deletions
diff --git a/inc/lib/Twig/Compiler.php b/inc/lib/Twig/Compiler.php
index 99aecbcc..b80210b1 100644..100755
--- 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);