mirror of
https://github.com/smarty-php/smarty.git
synced 2025-08-04 10:24:26 +02:00
- move some code from parser into compiler
This commit is contained in:
@@ -59,7 +59,7 @@ class Smarty_Internal_ParseTree_Tag extends Smarty_Internal_ParseTree
|
||||
*/
|
||||
public function assign_to_var(Smarty_Internal_Templateparser $parser)
|
||||
{
|
||||
$var = sprintf('$_tmp%d', ++ Smarty_Internal_Templateparser::$prefix_number);
|
||||
$var = $parser->compiler->getNewPrefixVariable();
|
||||
$tmp = $parser->compiler->appendCode('<?php ob_start();?>', $this->data);
|
||||
$tmp = $parser->compiler->appendCode($tmp, "<?php {$var}=ob_get_clean();?>");
|
||||
$parser->compiler->prefix_code[] = sprintf("%s", $tmp);
|
||||
|
Reference in New Issue
Block a user