projects
/
web/konrad/twig.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
(parent:
28f4cb7
)
added an exception when trying to outdent too much
author
Fabien Potencier
<fabien.potencier@gmail.com>
Tue, 14 Dec 2010 11:54:32 +0000 (12:54 +0100)
committer
Fabien Potencier
<fabien.potencier@gmail.com>
Tue, 14 Dec 2010 11:54:32 +0000 (12:54 +0100)
lib/Twig/Compiler.php
patch
|
blob
|
history
diff --git
a/lib/Twig/Compiler.php
b/lib/Twig/Compiler.php
index
72d791d
..
7eb90d0
100644
(file)
--- a/
lib/Twig/Compiler.php
+++ b/
lib/Twig/Compiler.php
@@
-218,6
+218,10
@@
class Twig_Compiler implements Twig_CompilerInterface
{
$this->indentation -= $step;
+ if ($this->indentation < 0) {
+ throw new Twig_Error('Unable to call outdent() as the indentation would become negative');
+ }
+
return $this;
}
}