From 2f83a70627986fbe1ed62a577c7e77ea3a6539d3 Mon Sep 17 00:00:00 2001 From: "uwe.tews@googlemail.com" Date: Wed, 9 Jan 2013 00:05:07 +0000 Subject: [PATCH] - bugfix compilation did fail when a prefilter did modify an {extends} tag (Forum Topic 23966) --- change_log.txt | 3 +++ libs/sysplugins/smarty_internal_compile_extends.php | 2 +- 2 files changed, 4 insertions(+), 1 deletion(-) diff --git a/change_log.txt b/change_log.txt index 518bcaf0..96e935a4 100644 --- a/change_log.txt +++ b/change_log.txt @@ -1,4 +1,7 @@ ===== trunk ===== +09.01.2013 +- bugfix compilation did fail when a prefilter did modify an {extends} tag (Forum Topic 23966) + 06.01.2013 - Allow '://' URL syntax in template names of stream resources (Issue #129) diff --git a/libs/sysplugins/smarty_internal_compile_extends.php b/libs/sysplugins/smarty_internal_compile_extends.php index b93139bf..fe14a408 100644 --- a/libs/sysplugins/smarty_internal_compile_extends.php +++ b/libs/sysplugins/smarty_internal_compile_extends.php @@ -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->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) != preg_match_all("!({$this->_ldl}{$al}/block\s*{$this->_rdl})!", $_content, $c)) { $compiler->trigger_template_error('unmatched {block} {/block} pairs');