- 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

@@ -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;