remove unnecessary param for preg

This commit is contained in:
monte.ohrt
2010-02-18 14:45:27 +00:00
parent 950c3a7307
commit c5b0288087

View File

@@ -34,7 +34,7 @@ function smarty_modifier_truncate($string, $length = 80, $etc = '...',
if (mb_strlen($string) > $length) {
$length -= min($length, mb_strlen($etc));
if (!$break_words && !$middle) {
$string = preg_replace('/\s+?(\S+)?$/u', '', mb_substr($string, 0, $length + 1), 'p');
$string = preg_replace('/\s+?(\S+)?$/u', '', mb_substr($string, 0, $length + 1));
}
if (!$middle) {
return mb_substr($string, 0, $length) . $etc;