From: fabien Date: Wed, 14 Oct 2009 08:30:47 +0000 (+0000) Subject: changed PHP 5.2.6 fix (thanks luniki for the idea) X-Git-Url: http://git.silmor.de/gitweb/?a=commitdiff_plain;h=5041a6e6572212342702e0c02fd816db6993281e;p=konrad%2Ftwig.git changed PHP 5.2.6 fix (thanks luniki for the idea) git-svn-id: http://svn.twig-project.org/trunk@46 93ef8e89-cb99-4229-a87c-7fa0fa45744b --- diff --git a/lib/Twig/Compiler.php b/lib/Twig/Compiler.php index a48df74..36de8d4 100644 --- a/lib/Twig/Compiler.php +++ b/lib/Twig/Compiler.php @@ -170,8 +170,8 @@ class Twig_Compiler implements Twig_CompilerInterface */ public function pushContext() { - // the $c variable is here to fix a PHP 5.2.6 bug - $this->write('$context[\'_parent\'] = $c = $context;'."\n"); + // the (array) cast bypasses a PHP 5.2.6 bug + $this->write('$context[\'_parent\'] = (array) $context;'."\n"); return $this; }