mirror of
https://github.com/smarty-php/smarty.git
synced 2025-08-04 18:34:27 +02:00
- fix compiled code for new {block} assign attribute
This commit is contained in:
@@ -4,6 +4,7 @@
|
||||
- rework of template inheritance
|
||||
- speed and size optimizations
|
||||
- bugfix under HHVM temporary cache file must only be created when caches template was updated
|
||||
- fix compiled code for new {block} assign attribute
|
||||
|
||||
18.09.2015
|
||||
- bugfix {if $foo instanceof $bar} failed to compile if 2nd value is a variable https://github.com/smarty-php/smarty/issues/92
|
||||
|
@@ -119,7 +119,7 @@ class Smarty extends Smarty_Internal_TemplateBase
|
||||
/**
|
||||
* smarty version
|
||||
*/
|
||||
const SMARTY_VERSION = '3.1.28-dev/64';
|
||||
const SMARTY_VERSION = '3.1.28-dev/65';
|
||||
|
||||
/**
|
||||
* define variable scopes
|
||||
|
@@ -201,7 +201,7 @@ class Smarty_Internal_Compile_Blockclose extends Smarty_Internal_Compile_Shared_
|
||||
$compiler->parser->current_buffer->append_subtree($compiler->parser, $_functionCode);
|
||||
$output = "<?php\n";
|
||||
if (isset($_assign)) {
|
||||
$output .= "\$_smarty_tpl->tpl_vars[{$_assign}] = new Smarty_Variable(ob_get_contents());\n";
|
||||
$output .= "\$_smarty_tpl->tpl_vars[{$_assign}] = new Smarty_Variable(ob_get_clean());\n";
|
||||
}
|
||||
$output .= "/*%%SmartyNocache:{$compiler->template->compiled->nocache_hash}%%*/\n";
|
||||
$output .= "}\n";
|
||||
@@ -232,7 +232,7 @@ class Smarty_Internal_Compile_Blockclose extends Smarty_Internal_Compile_Shared_
|
||||
$compiler->parser->current_buffer->append_subtree($compiler->parser, $_functionCode);
|
||||
$output = "<?php\n";
|
||||
if (isset($_assign)) {
|
||||
$output .= "\$_smarty_tpl->tpl_vars[{$_assign}] = new Smarty_Variable(ob_get_contents());\n";
|
||||
$output .= "\$_smarty_tpl->tpl_vars[{$_assign}] = new Smarty_Variable(ob_get_clean());\n";
|
||||
}
|
||||
$output .= "}\n";
|
||||
$output .= "/* {/block '{$_name}'} */\n\n";
|
||||
|
Reference in New Issue
Block a user