From 9419a999c9942b1317efff55e3330619ddc753fa Mon Sep 17 00:00:00 2001 From: "uwe.tews@googlemail.com" Date: Fri, 27 Jan 2012 19:30:53 +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 51417253..17fa9a7e 100644 --- a/change_log.txt +++ b/change_log.txt @@ -1,4 +1,7 @@ ===== trunk ===== +27.01.2012 +- bugfix Smarty did not a template name of "0" (Forum Topic 20895) + 20.01.2012 - bugfix typo in Smarty_Internal_Get_IncludePath did cause runtime overhead (Issue 74) - improvment remove unneeded assigments (Issue 75 and 76) diff --git a/libs/sysplugins/smarty_internal_template.php b/libs/sysplugins/smarty_internal_template.php index 94b27b9c..a34e247e 100644 --- a/libs/sysplugins/smarty_internal_template.php +++ b/libs/sysplugins/smarty_internal_template.php @@ -622,8 +622,8 @@ class Smarty_Internal_Template extends Smarty_Internal_TemplateBase { { switch ($property_name) { case 'source': - if (empty($this->template_resource)) { - throw new SmartyException("Unable to parse resource name \"{$this->template_resource}\""); + if (strlen($this->template_resource) == 0) { + throw new SmartyException('Missing template name'); } $this->source = Smarty_Resource::source($this); // cache template object under a unique ID