From 077b7e786519f184f18b4f750c77699907abf975 Mon Sep 17 00:00:00 2001 From: messju Date: Tue, 24 Feb 2004 22:23:13 +0000 Subject: [PATCH] _parse_resource_name() returned true on non-existant absolute paths. This caused a warning on _fetch_resource_info() when used in conjunction with template_exists(). It should be fixed now without negative effects. --- NEWS | 1 + libs/Smarty.class.php | 3 +++ 2 files changed, 4 insertions(+) diff --git a/NEWS b/NEWS index aeb7e6d9..f5dbd62e 100644 --- a/NEWS +++ b/NEWS @@ -1,3 +1,4 @@ + - fix avoid warning with template_exists() on an absolute paths (messju) - fix parameters passed to resource's secure()-function (messju) - fix handling of integer values like width and delay im smarty_function_popup() (messju) diff --git a/libs/Smarty.class.php b/libs/Smarty.class.php index 717fbacf..8d0ad9e5 100644 --- a/libs/Smarty.class.php +++ b/libs/Smarty.class.php @@ -1665,6 +1665,9 @@ class Smarty } } return false; + } else { + /* absolute path */ + return file_exists($params['resource_name']); } } elseif (empty($this->_plugins['resource'][$params['resource_type']])) { $_params = array('type' => $params['resource_type']);