From: fabien Date: Tue, 13 Oct 2009 17:13:49 +0000 (+0000) Subject: fixed context stack for PHP 5.2.6 X-Git-Url: http://git.silmor.de/gitweb/?a=commitdiff_plain;h=e9c642351ed033fe598cddaf9b5abee5b123db96;p=konrad%2Ftwig.git fixed context stack for PHP 5.2.6 git-svn-id: http://svn.twig-project.org/trunk@37 93ef8e89-cb99-4229-a87c-7fa0fa45744b --- 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; }