diff --git a/include/smarty/internals/core.is_trusted.php b/include/smarty/internals/core.is_trusted.php
index f0bd2fb8c96f945e9e0d9015749e07a6e9bf84b4..429973158d6cb75b3a6126f471aac3218fb6dc56 100644 (file)
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;
}