diff options
author | emkael <emkael@tlen.pl> | 2018-10-18 02:40:38 +0200 |
---|---|---|
committer | emkael <emkael@tlen.pl> | 2018-10-18 02:40:38 +0200 |
commit | eab8a101e7a3fcbb41e01a574985e06c5a3775de (patch) | |
tree | 60f201da5984b0c3638d10da02bba42b61aa3177 /lib/smarty3/plugins/shared.mb_str_replace.php | |
parent | 7f38be342c1495aeca418286c15c25c18ac9e142 (diff) |
Updating Smarty
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; } } |