From 5041a6e6572212342702e0c02fd816db6993281e Mon Sep 17 00:00:00 2001 From: fabien Date: Wed, 14 Oct 2009 08:30:47 +0000 Subject: [PATCH] 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 --- lib/Twig/Compiler.php | 4 ++-- 1 files changed, 2 insertions(+), 2 deletions(-) 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; } -- 1.7.2.5