projects
/
web/konrad/twig.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
(parent:
051e6ab
)
fixes an infinite loop on some Windows configurations
author
Fabien Potencier
<fabien.potencier@gmail.com>
Mon, 31 Jan 2011 07:47:08 +0000 (08:47 +0100)
committer
Fabien Potencier
<fabien.potencier@gmail.com>
Mon, 31 Jan 2011 07:48:35 +0000 (08:48 +0100)
lib/Twig/Template.php
patch
|
blob
|
history
diff --git
a/lib/Twig/Template.php
b/lib/Twig/Template.php
index
d4e1d74
..
e53cf96
100644
(file)
--- a/
lib/Twig/Template.php
+++ b/
lib/Twig/Template.php
@@
-169,7
+169,11
@@
abstract class Twig_Template implements Twig_TemplateInterface
try {
$this->display($context);
} catch (Exception $e) {
- while (ob_get_level()) {
+ // the count variable avoids an infinite loop on
+ // some Windows configurations where ob_get_level()
+ // never reaches 0
+ $count = 100;
+ while (ob_get_level() && --$count) {
ob_end_clean();
}