- bugfix add addition check for OS type on normalization of file path https://github.com/smarty-php/smarty/issues/134

This commit is contained in:
uwetews
2015-12-20 16:21:32 +01:00
parent 6483164d18
commit 78243be722
2 changed files with 3 additions and 2 deletions

View File

@@ -2,6 +2,7 @@
20.12.2015 20.12.2015
- bugfix failure when the default resource type was set to 'extendsall' https://github.com/smarty-php/smarty/issues/123 - bugfix failure when the default resource type was set to 'extendsall' https://github.com/smarty-php/smarty/issues/123
- update compilation of Smarty special variables - update compilation of Smarty special variables
- bugfix add addition check for OS type on normalizaition of file path https://github.com/smarty-php/smarty/issues/134
19.12.2015 19.12.2015
- bugfix using $smarty.capture.foo in expressions could fail https://github.com/smarty-php/smarty/pull/138 - bugfix using $smarty.capture.foo in expressions could fail https://github.com/smarty-php/smarty/pull/138

View File

@@ -118,7 +118,7 @@ class Smarty extends Smarty_Internal_TemplateBase
/** /**
* smarty version * smarty version
*/ */
const SMARTY_VERSION = '3.1.29-dev/15'; const SMARTY_VERSION = '3.1.29-dev/16';
/** /**
* define variable scopes * define variable scopes
@@ -1178,7 +1178,7 @@ class Smarty extends Smarty_Internal_TemplateBase
$path = str_replace($nds, DS, $path); $path = str_replace($nds, DS, $path);
} }
if ($realpath === true && $path[0] !== '/' && $path[1] !== ':') { if ($realpath === true && (($path[0] !== '/' && DS == '/') || ($path[1] !== ':' && DS != '/'))) {
$path = getcwd() . DS . $path; $path = getcwd() . DS . $path;
} }
while ((strpos($path, '.' . DS) !== false) || (strpos($path, DS . DS) !== false)) { while ((strpos($path, '.' . DS) !== false) || (strpos($path, DS . DS) !== false)) {