From 090ba8e7c5a4f4ef819bdd67eb7e82afa073302c Mon Sep 17 00:00:00 2001 From: "uwe.tews@googlemail.com" Date: Wed, 15 Aug 2012 15:09:12 +0000 Subject: [PATCH] - bugfix template inheritance did produce wrong code if subtemplates with {block} was included several times (from smarty-developers forum) --- change_log.txt | 4 ++++ libs/sysplugins/smarty_internal_templatecompilerbase.php | 2 ++ 2 files changed, 6 insertions(+) diff --git a/change_log.txt b/change_log.txt index e2be9ef1..cf582650 100644 --- a/change_log.txt +++ b/change_log.txt @@ -1,4 +1,8 @@ ===== trunk ===== +15.08.2012 +- bugfix template inheritance did produce wrong code if subtemplates with {block} was + included several times (from smarty-developers forum) + 14.08.2012 - bugfix PHP5.2 compatibility compromised by SplFileInfo::getBasename() (Issue 110) diff --git a/libs/sysplugins/smarty_internal_templatecompilerbase.php b/libs/sysplugins/smarty_internal_templatecompilerbase.php index 85906239..bd9de418 100644 --- a/libs/sysplugins/smarty_internal_templatecompilerbase.php +++ b/libs/sysplugins/smarty_internal_templatecompilerbase.php @@ -215,6 +215,8 @@ abstract class Smarty_Internal_TemplateCompilerBase { } else { $code = $template_header . $template->createTemplateCodeFrame($_compiled_code) . $merged_code; } + // unset content because template inheritance could have replace source with parent code + unset ($template->source->content); return $code; }