- bugfix on assigning multidimensional arrays within templates

- corrected bugfix for truncate modifier
This commit is contained in:
Uwe.Tews
2010-07-08 18:30:03 +00:00
parent 396d7aa8a5
commit db38a0aaec
5 changed files with 52 additions and 29 deletions
+1 -1
View File
@@ -31,7 +31,7 @@ function smarty_modifier_truncate($string, $length = 80, $etc = '...',
return '';
if (is_callable('mb_strlen')) {
if (mb_detect_encoding($text, 'UTF-8, ISO-8859-1') === 'UTF-8') {
if (mb_detect_encoding($string, 'UTF-8, ISO-8859-1') === 'UTF-8') {
// $string has utf-8 encoding
if (mb_strlen($string) > $length) {
$length -= min($length, mb_strlen($etc));