mirror of
https://github.com/smarty-php/smarty.git
synced 2026-05-05 04:04:10 +02:00
- bugfix and enhancement
Because several recent problems with template inheritance the {block} tag compiler has been rewriten
- Error messages shown now the correct child template file and line number
- The compiler could fail on some larger UTF-8 text block (forum topic 24455}
- The {strip} tag can now be placed outside {block} tags in child templates (forum topic 24289}
- change SmartyException::$escape is now false by default
- change PHP traceback has been remove for SmartyException and SmartyCompilerException
This commit is contained in:
@@ -94,6 +94,10 @@ class Smarty_Internal_SmartyTemplateCompiler extends Smarty_Internal_TemplateCom
|
||||
// init the lexer/parser to compile the template
|
||||
$this->lex = new $this->lexer_class($_content, $this);
|
||||
$this->parser = new $this->parser_class($this->lex, $this);
|
||||
if ($this->inheritance_child) {
|
||||
// start state on child templates
|
||||
$this->lex->yypushstate(Smarty_Internal_Templatelexer::CHILDBODY);
|
||||
}
|
||||
if ($this->smarty->_parserdebug)
|
||||
$this->parser->PrintTrace();
|
||||
// get tokens from lexer and parse them
|
||||
|
||||
Reference in New Issue
Block a user