mirror of
https://github.com/smarty-php/smarty.git
synced 2026-05-06 08:26:19 +02:00
- bugfix on assigning multidimensional arrays within templates
- corrected bugfix for truncate modifier
This commit is contained in:
@@ -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));
|
||||
|
||||
Reference in New Issue
Block a user