From 96834d2272026a3b5accb5fbb70dc89b85c21ba0 Mon Sep 17 00:00:00 2001 From: fabien Date: Mon, 16 Nov 2009 12:36:34 +0000 Subject: [PATCH] fixed bug when the filename of a template contains */ git-svn-id: http://svn.twig-project.org/trunk@141 93ef8e89-cb99-4229-a87c-7fa0fa45744b --- lib/Twig/Node/Module.php | 3 ++- 1 files changed, 2 insertions(+), 1 deletions(-) diff --git a/lib/Twig/Node/Module.php b/lib/Twig/Node/Module.php index f77f1dd..80a3df6 100644 --- a/lib/Twig/Node/Module.php +++ b/lib/Twig/Node/Module.php @@ -106,7 +106,8 @@ class Twig_Node_Module extends Twig_Node implements Twig_NodeListInterface } $compiler - ->write("/* $this->filename */\n") + // if the filename contains */, add a blank to avoid a PHP parse error + ->write("/* ".str_replace('*/', '* /', $this->filename)." */\n") ->write('class '.$compiler->getTemplateClass($this->filename)) ; -- 1.7.2.5