From e9c642351ed033fe598cddaf9b5abee5b123db96 Mon Sep 17 00:00:00 2001 From: fabien Date: Tue, 13 Oct 2009 17:13:49 +0000 Subject: [PATCH] fixed context stack for PHP 5.2.6 git-svn-id: http://svn.twig-project.org/trunk@37 93ef8e89-cb99-4229-a87c-7fa0fa45744b --- lib/Twig/Compiler.php | 3 ++- 1 files changed, 2 insertions(+), 1 deletions(-) diff --git a/lib/Twig/Compiler.php b/lib/Twig/Compiler.php index 552febe..a48df74 100644 --- a/lib/Twig/Compiler.php +++ b/lib/Twig/Compiler.php @@ -170,7 +170,8 @@ class Twig_Compiler implements Twig_CompilerInterface */ public function pushContext() { - $this->write('$context[\'_parent\'] = $context;'."\n"); + // the $c variable is here to fix a PHP 5.2.6 bug + $this->write('$context[\'_parent\'] = $c = $context;'."\n"); return $this; } -- 1.7.2.5