mirror of
https://github.com/smarty-php/smarty.git
synced 2026-05-05 12:14:12 +02:00
- avoid possible circular object referances caused by parser/lexer objects
This commit is contained in:
@@ -19,13 +19,14 @@ class Smarty_Internal_Compile_Assign extends Smarty_Internal_CompileBase
|
||||
/**
|
||||
* Compiles code for the {assign} tag
|
||||
*
|
||||
* @param array $args array with attributes from parser
|
||||
* @param object $compiler compiler object
|
||||
* @param array $parameter array with compilation parameter
|
||||
* @param array $args array with attributes from parser
|
||||
* @param \Smarty_Internal_TemplateCompilerBase $compiler compiler object
|
||||
* @param array $parameter array with compilation parameter
|
||||
*
|
||||
* @return string compiled code
|
||||
* @throws \SmartyCompilerException
|
||||
*/
|
||||
public function compile($args, $compiler, $parameter)
|
||||
public function compile($args, Smarty_Internal_TemplateCompilerBase $compiler, $parameter)
|
||||
{
|
||||
// the following must be assigned at runtime because it will be overwritten in Smarty_Internal_Compile_Append
|
||||
$this->required_attributes = array('var', 'value');
|
||||
@@ -55,7 +56,7 @@ class Smarty_Internal_Compile_Assign extends Smarty_Internal_CompileBase
|
||||
} elseif ($_attr['scope'] == 'global') {
|
||||
$_scope = Smarty::SCOPE_GLOBAL;
|
||||
} else {
|
||||
$compiler->trigger_template_error('illegal value for "scope" attribute', $compiler->lex->taglineno);
|
||||
$compiler->trigger_template_error('illegal value for "scope" attribute', null, true);
|
||||
}
|
||||
}
|
||||
// compiled output
|
||||
|
||||
Reference in New Issue
Block a user