projects
/
konrad/twig.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
(parent:
427fce4
)
removed unneeded variable
author
Fabien Potencier
<fabien.potencier@gmail.com>
Mon, 2 Sep 2013 13:50:59 +0000 (15:50 +0200)
committer
Fabien Potencier
<fabien.potencier@gmail.com>
Mon, 2 Sep 2013 13:50:59 +0000 (15:50 +0200)
lib/Twig/Compiler.php
patch
|
blob
|
history
diff --git
a/lib/Twig/Compiler.php
b/lib/Twig/Compiler.php
index
99aecbc
..
b80210b
100644
(file)
--- 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);