From 6197df45b5df1ac9dd5c798fdce85a84363f5e9e Mon Sep 17 00:00:00 2001 From: Uwe Tews Date: Sat, 27 Jun 2015 20:08:17 +0200 Subject: [PATCH] - update $smarty->_realpath for relative path not starting with './' --- change_log.txt | 3 ++- libs/Smarty.class.php | 4 ++-- 2 files changed, 4 insertions(+), 3 deletions(-) diff --git a/change_log.txt b/change_log.txt index 9cea8e6e..ab3887d1 100644 --- a/change_log.txt +++ b/change_log.txt @@ -1,7 +1,8 @@  ===== 3.1.28-dev===== (xx.xx.2015) 27.06.2015 - bugfix resolve naming conflict between custom Smarty delimiter '<%' and PHP ASP tags https://github.com/smarty-php/smarty/issues/64 - + - update $smarty->_realpath for relative path not starting with './' + 19.06.2015 - improvement allow closures as callback at $smarty->registerFilter() https://github.com/smarty-php/smarty/issues/59 diff --git a/libs/Smarty.class.php b/libs/Smarty.class.php index a7f429de..fdc2b377 100644 --- a/libs/Smarty.class.php +++ b/libs/Smarty.class.php @@ -111,7 +111,7 @@ class Smarty extends Smarty_Internal_TemplateBase /** * smarty version */ - const SMARTY_VERSION = '3.1.28-dev/7'; + const SMARTY_VERSION = '3.1.28-dev/8'; /** * define variable scopes @@ -1481,7 +1481,7 @@ class Smarty extends Smarty_Internal_TemplateBase */ public function _realpath($path) { - if ($path[0] == '.') { + if ($path[0] !== '/' && $path[1] !== ':') { $path = getcwd() . DS . $path; } //return realpath($path) . DS;