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

@@ -25,7 +25,7 @@ function smarty_core_is_trusted($params, &$smarty)
if (!empty($curr_dir) && is_readable ($curr_dir)) {
$_cd = realpath($curr_dir);
if (strncmp($_rp, $_cd, strlen($_cd)) == 0
&& $_rp{strlen($_cd)} == DIRECTORY_SEPARATOR ) {
&& substr($_rp, strlen($_cd), 1) == DIRECTORY_SEPARATOR ) {
$_smarty_trusted = true;
break;
}