diff --git a/change_log.txt b/change_log.txt index b9778c3e..c0bf6609 100644 --- a/change_log.txt +++ b/change_log.txt @@ -1,6 +1,7 @@ ===== trunk ===== 05.10.2011 - bugfix of problem introduced with r4342 by replacing strlen() with isset() +- add environment configuration issue with mbstring.func_overload Smarty cannot compensate for (Issue #45) 04.10.2011 - bugfix assign() in plugins called in subtemplates did change value also in parent template diff --git a/libs/Smarty.class.php b/libs/Smarty.class.php index 8060f3b9..10affa91 100644 --- a/libs/Smarty.class.php +++ b/libs/Smarty.class.php @@ -57,6 +57,9 @@ if (!defined('SMARTY_PLUGINS_DIR')) { define('SMARTY_PLUGINS_DIR', SMARTY_DIR . 'plugins' . DS); } if (!defined('SMARTY_MBSTRING')) { + if (ini_get('mbstring.func_overload') & 2) { + throw new SmartyException("mbstring.func_overload is active which breaks Smarty's compiler."); + } define('SMARTY_MBSTRING', function_exists('mb_strlen')); } if (!defined('SMARTY_RESOURCE_CHAR_SET')) {