diff options
Diffstat (limited to 'lib/smarty/plugins/shared.mb_str_replace.php')
-rw-r--r-- | lib/smarty/plugins/shared.mb_str_replace.php | 18 |
1 files changed, 8 insertions, 10 deletions
diff --git a/lib/smarty/plugins/shared.mb_str_replace.php b/lib/smarty/plugins/shared.mb_str_replace.php index ecafeb7..206cf9e 100644 --- a/lib/smarty/plugins/shared.mb_str_replace.php +++ b/lib/smarty/plugins/shared.mb_str_replace.php @@ -2,22 +2,22 @@ /** * Smarty shared plugin * - * @package Smarty + * @package Smarty * @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 */ - function smarty_mb_str_replace($search, $replace, $subject, &$count=0) + function smarty_mb_str_replace($search, $replace, $subject, &$count = 0) { if (!is_array($search) && is_array($replace)) { return false; @@ -25,7 +25,7 @@ if (!function_exists('smarty_mb_str_replace')) { if (is_array($subject)) { // call mb_replace for each single string in $subject foreach ($subject as &$string) { - $string = &smarty_mb_str_replace($search, $replace, $string, $c); + $string = smarty_mb_str_replace($search, $replace, $string, $c); $count += $c; } } elseif (is_array($search)) { @@ -50,6 +50,4 @@ if (!function_exists('smarty_mb_str_replace')) { } return $subject; } - } -?>
\ No newline at end of file |