replace {} string access with equivalent substr() to avoid E_STRICT warnings in PHP 5.1

This commit is contained in:
boots
2005-11-23 20:36:05 +00:00
parent 3741b9d6c5
commit fdb25e363f
8 changed files with 31 additions and 29 deletions

View File

@@ -22,7 +22,7 @@ function smarty_core_create_dir_structure($params, &$smarty)
/* 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);
}