diff --git a/include/smarty/internals/core.create_dir_structure.php b/include/smarty/internals/core.create_dir_structure.php
index 999cf59302c690c14e488f57d48c6761abcddb68..3eecc49723c78615f8e28d0623984d07d09a58c9 100644 (file)
/* unix-style paths */
$_dir = $params['dir'];
$_dir_parts = preg_split('!/+!', $_dir, -1, PREG_SPLIT_NO_EMPTY);
- $_new_dir = ($_dir{0}=='/') ? '/' : getcwd().'/';
+ $_new_dir = (substr($_dir, 0, 1)=='/') ? '/' : getcwd().'/';
if($_use_open_basedir = !empty($_open_basedir_ini)) {
$_open_basedirs = explode(':', $_open_basedir_ini);
}