- bugfix compilation did fail when a prefilter did modify an {extends} tag (Forum Topic 23966)

This commit is contained in:
uwe.tews@googlemail.com
2013-01-09 00:05:07 +00:00
parent b24eada147
commit 2f83a70627
2 changed files with 4 additions and 1 deletions

View File

@@ -1,4 +1,7 @@
===== trunk ===== ===== trunk =====
09.01.2013
- bugfix compilation did fail when a prefilter did modify an {extends} tag (Forum Topic 23966)
06.01.2013 06.01.2013
- Allow '://' URL syntax in template names of stream resources (Issue #129) - Allow '://' URL syntax in template names of stream resources (Issue #129)

View File

@@ -82,7 +82,7 @@ class Smarty_Internal_Compile_Extends extends Smarty_Internal_CompileBase {
$compiler->trigger_template_error("illegal recursive call of \"{$include_file}\"", $compiler->lex->line - 1); $compiler->trigger_template_error("illegal recursive call of \"{$include_file}\"", $compiler->lex->line - 1);
} }
$compiler->template->properties['file_dependency'][$template_sha1] = array($_template->source->filepath, $_template->source->timestamp, $_template->source->type); $compiler->template->properties['file_dependency'][$template_sha1] = array($_template->source->filepath, $_template->source->timestamp, $_template->source->type);
$_content = ($this->mbstring_overload ? mb_substr($compiler->template->source->content, $compiler->lex->counter - 1, 20000000, 'latin1') : substr($compiler->template->source->content, $compiler->lex->counter - 1)); $_content = ($this->mbstring_overload ? mb_substr($compiler->lex->data, $compiler->lex->counter - 1, 20000000, 'latin1') : substr($compiler->lex->data, $compiler->lex->counter - 1));
if (preg_match_all("!({$this->_ldl}{$al}block\s(.+?)\s*{$this->_rdl})!", $_content, $s) != if (preg_match_all("!({$this->_ldl}{$al}block\s(.+?)\s*{$this->_rdl})!", $_content, $s) !=
preg_match_all("!({$this->_ldl}{$al}/block\s*{$this->_rdl})!", $_content, $c)) { preg_match_all("!({$this->_ldl}{$al}/block\s*{$this->_rdl})!", $_content, $c)) {
$compiler->trigger_template_error('unmatched {block} {/block} pairs'); $compiler->trigger_template_error('unmatched {block} {/block} pairs');