- bugfix replace modifier did not work in 3.0.7 on systems without multibyte support

- bugfix {$smarty.template} could return in 3.0.7 parent template name instead of 
         child name when it needed to compile
This commit is contained in:
uwe.tews@googlemail.com
2011-03-01 19:47:44 +00:00
parent e583777976
commit fe26cf256e
4 changed files with 15 additions and 6 deletions

View File

@@ -22,8 +22,10 @@
*/
function smarty_modifier_replace($string, $search, $replace)
{
require_once(SMARTY_PLUGINS_DIR . 'shared.mb_str_replace.php');
return smarty_mb_str_replace($search, $replace, $string);
if (function_exists('mb_split')) {
require_once(SMARTY_PLUGINS_DIR . 'shared.mb_str_replace.php');
return smarty_mb_str_replace($search, $replace, $string);
}
return str_replace($search, $replace, $string);
}
?>