From: fabien Date: Mon, 16 Nov 2009 12:36:34 +0000 (+0000) Subject: fixed bug when the filename of a template contains */ X-Git-Url: http://git.silmor.de/gitweb/?a=commitdiff_plain;h=96834d2272026a3b5accb5fbb70dc89b85c21ba0;p=konrad%2Ftwig.git fixed bug when the filename of a template contains */ git-svn-id: http://svn.twig-project.org/trunk@141 93ef8e89-cb99-4229-a87c-7fa0fa45744b --- 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)) ;