- update $smarty->_realpath for relative path not starting with './'

This commit is contained in:
Uwe Tews
2015-06-27 20:08:17 +02:00
parent aefec40962
commit 6197df45b5
2 changed files with 4 additions and 3 deletions

View File

@@ -1,7 +1,8 @@
 ===== 3.1.28-dev===== (xx.xx.2015)  ===== 3.1.28-dev===== (xx.xx.2015)
27.06.2015 27.06.2015
- bugfix resolve naming conflict between custom Smarty delimiter '<%' and PHP ASP tags https://github.com/smarty-php/smarty/issues/64 - 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 19.06.2015
- improvement allow closures as callback at $smarty->registerFilter() https://github.com/smarty-php/smarty/issues/59 - improvement allow closures as callback at $smarty->registerFilter() https://github.com/smarty-php/smarty/issues/59

View File

@@ -111,7 +111,7 @@ class Smarty extends Smarty_Internal_TemplateBase
/** /**
* smarty version * smarty version
*/ */
const SMARTY_VERSION = '3.1.28-dev/7'; const SMARTY_VERSION = '3.1.28-dev/8';
/** /**
* define variable scopes * define variable scopes
@@ -1481,7 +1481,7 @@ class Smarty extends Smarty_Internal_TemplateBase
*/ */
public function _realpath($path) public function _realpath($path)
{ {
if ($path[0] == '.') { if ($path[0] !== '/' && $path[1] !== ':') {
$path = getcwd() . DS . $path; $path = getcwd() . DS . $path;
} }
//return realpath($path) . DS; //return realpath($path) . DS;