From 8d6016420148ae7eed229f8348cc2f37c8148d4b Mon Sep 17 00:00:00 2001 From: "uwe.tews@googlemail.com" Date: Fri, 30 Mar 2012 14:21:16 +0000 Subject: [PATCH] --- change_log.txt | 3 +++ libs/sysplugins/smarty_internal_template.php | 4 ++-- 2 files changed, 5 insertions(+), 2 deletions(-) diff --git a/change_log.txt b/change_log.txt index 26f76818..70cd842f 100644 --- a/change_log.txt +++ b/change_log.txt @@ -1,4 +1,7 @@ ===== trunk ===== +30.03.2012 +- bugfix template inheritance did not throw exception when a parent template was deleted (issue 90) + 27.03.2012 - bugfix prefilter did run multiple times on inline subtemplates compiled into several main templates (Forum Topic 21325) - bugfix implement Smarty2's behaviour of variables assigned by reference in SmartyBC. {assign} will affect all references. diff --git a/libs/sysplugins/smarty_internal_template.php b/libs/sysplugins/smarty_internal_template.php index 447ff3c9..1a75fd4f 100644 --- a/libs/sysplugins/smarty_internal_template.php +++ b/libs/sysplugins/smarty_internal_template.php @@ -442,7 +442,7 @@ class Smarty_Internal_Template extends Smarty_Internal_TemplateBase { $mtime = $this->source->timestamp; } else { // file and php types can be checked without loading the respective resource handlers - $mtime = filemtime($_file_to_check[0]); + $mtime = @filemtime($_file_to_check[0]); } } elseif ($_file_to_check[2] == 'string') { continue; @@ -450,7 +450,7 @@ class Smarty_Internal_Template extends Smarty_Internal_TemplateBase { $source = Smarty_Resource::source(null, $this->smarty, $_file_to_check[0]); $mtime = $source->timestamp; } - if ($mtime > $_file_to_check[1]) { + if (!$mtime || $mtime > $_file_to_check[1]) { $is_valid = false; break; }