mirror of
https://github.com/smarty-php/smarty.git
synced 2025-12-06 01:09:25 +01:00
- performance require_once should be called only once for shared plugins https://github.com/smarty-php/smarty/issues/280
This commit is contained in:
@@ -25,8 +25,9 @@
|
||||
function smarty_modifier_replace($string, $search, $replace)
|
||||
{
|
||||
if (Smarty::$_MBSTRING) {
|
||||
require_once(SMARTY_PLUGINS_DIR . 'shared.mb_str_replace.php');
|
||||
|
||||
if (!is_callable('smarty_mb_str_replace')) {
|
||||
require_once(SMARTY_PLUGINS_DIR . 'shared.mb_str_replace.php');
|
||||
}
|
||||
return smarty_mb_str_replace($search, $replace, $string);
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user