diff options
Diffstat (limited to 'lib/smarty3/plugins/shared.mb_str_replace.php')
-rw-r--r-- | lib/smarty3/plugins/shared.mb_str_replace.php | 12 |
1 files changed, 5 insertions, 7 deletions
diff --git a/lib/smarty3/plugins/shared.mb_str_replace.php b/lib/smarty3/plugins/shared.mb_str_replace.php index 0c3ffe2..206cf9e 100644 --- a/lib/smarty3/plugins/shared.mb_str_replace.php +++ b/lib/smarty3/plugins/shared.mb_str_replace.php @@ -6,14 +6,13 @@ * @subpackage PluginsShared */ if (!function_exists('smarty_mb_str_replace')) { - /** * Multibyte string replace * - * @param string $search the string to be searched - * @param string $replace the replacement string - * @param string $subject the source string - * @param int &$count number of matches found + * @param string|string[] $search the string to be searched + * @param string|string[] $replace the replacement string + * @param string $subject the source string + * @param int &$count number of matches found * * @return string replaced string * @author Rodney Rehm @@ -37,7 +36,7 @@ if (!function_exists('smarty_mb_str_replace')) { } } else { $n = max(count($search), count($replace)); - while ($n --) { + while ($n--) { $subject = smarty_mb_str_replace(current($search), current($replace), $subject, $c); $count += $c; next($search); @@ -49,7 +48,6 @@ if (!function_exists('smarty_mb_str_replace')) { $count = count($parts) - 1; $subject = implode($replace, $parts); } - return $subject; } } |