From c188b50ecc245536184a4cf65a5d348c61affe6e Mon Sep 17 00:00:00 2001 From: "monte.ohrt" Date: Tue, 16 Feb 2010 15:20:47 +0000 Subject: [PATCH] change ereg to preg --- libs/plugins/modifier.truncate.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/libs/plugins/modifier.truncate.php b/libs/plugins/modifier.truncate.php index 943a8ab6..d89bcef5 100644 --- a/libs/plugins/modifier.truncate.php +++ b/libs/plugins/modifier.truncate.php @@ -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 = mb_ereg_replace('/\s+?(\S+)?$/', '', mb_substr($string, 0, $length + 1), 'p'); + $string = preg_replace('/\s+?(\S+)?$/u', '', mb_substr($string, 0, $length + 1), 'p'); } if (!$middle) { return mb_substr($string, 0, $length) . $etc;