From 5307693b7851251d3fa39427b42dc116cc79c693 Mon Sep 17 00:00:00 2001 From: mohrt Date: Thu, 20 Feb 2003 18:58:44 +0000 Subject: [PATCH] fix minor logic in _fetch_template_info() --- NEWS | 2 ++ Smarty.class.php | 8 ++++---- libs/Smarty.class.php | 8 ++++---- 3 files changed, 10 insertions(+), 8 deletions(-) diff --git a/NEWS b/NEWS index 32aaab08..8f85256e 100644 --- a/NEWS +++ b/NEWS @@ -1,3 +1,5 @@ + - fix minor logic in _fetch_template_info (Dennis Gearon, + Monte) - fix cache groups with compile_id set (Monte) - add support for merging appended vars (messju, Monte) - change embedded variable logic to only recognize $foo and diff --git a/Smarty.class.php b/Smarty.class.php index 7d15df5d..7d1bbf95 100644 --- a/Smarty.class.php +++ b/Smarty.class.php @@ -1651,10 +1651,10 @@ class Smarty if (!empty($this->default_template_handler_func)) { if (!function_exists($this->default_template_handler_func)) { $this->trigger_error("default template handler function \"$this->default_template_handler_func\" doesn't exist."); - $_return = false; - } - $funcname = $this->default_template_handler_func; - $_return = $funcname($resource_type, $resource_name, $template_source, $template_timestamp, $this); + } else { + $funcname = $this->default_template_handler_func; + $_return = $funcname($resource_type, $resource_name, $template_source, $template_timestamp, $this); + } } } diff --git a/libs/Smarty.class.php b/libs/Smarty.class.php index 7d15df5d..7d1bbf95 100644 --- a/libs/Smarty.class.php +++ b/libs/Smarty.class.php @@ -1651,10 +1651,10 @@ class Smarty if (!empty($this->default_template_handler_func)) { if (!function_exists($this->default_template_handler_func)) { $this->trigger_error("default template handler function \"$this->default_template_handler_func\" doesn't exist."); - $_return = false; - } - $funcname = $this->default_template_handler_func; - $_return = $funcname($resource_type, $resource_name, $template_source, $template_timestamp, $this); + } else { + $funcname = $this->default_template_handler_func; + $_return = $funcname($resource_type, $resource_name, $template_source, $template_timestamp, $this); + } } }