Re: [SMARTY-DEV] Bug in CVS HEAD
| From: | Monte Ohrt | Date: | Fri, 23 Feb 2007 16:08:18 +0000 |
| Subject: | Re: [SMARTY-DEV] Bug in CVS HEAD | ||
| References: | 1 | Groups: | php.smarty.dev |
| Request: | Send a blank email to php-smarty-dev+get-2962@lists.php.net to get a copy of this message | ||
There is a patch in CVS for this, moments after you got the last update I presume :)
Danilo Buerger wrote:
Hey list, Smarty goes berserk when trying to embed php code: Having php_handling == SMARTY_PHP_PASSTHRU : --- template --- {$smarty.now}<?php echo time(); ?> --- compile --- <?php echo time(); ?> <?php echo '<?' ?> php echo '<?php echo '<?' ?> php'; ?> echo time(); <?php echo '<?' ?> php echo '?>'; ?> --- expected compile --- <?php echo time(); ?> <?php echo '<?php'; ?> echo time(); <?php echo '?>'; ?> And when having php_handling == SMARTY_PHP_ALLOW : --- compile --- <?php echo time(); ?> <?php echo '<?' ?> php echo time(); ?> --- expected compile --- <?php echo time(); ?> <?php echo time(); ?> Here is the fix: Index: Smarty_Compiler.class.php =================================================================== RCS file: /repository/smarty/libs/Smarty_Compiler.class.php,v retrieving revision 1.389 diff -r1.389 Smarty_Compiler.class.php 357c357 < --- 372c372< $compiled_content .= $text_blocks[$i];---$compiled_content .= str_replace('<?',$tmp_id,$text_blocks[$i]);