diff --git a/change_log.txt b/change_log.txt index 7f85723d..f0a28832 100644 --- a/change_log.txt +++ b/change_log.txt @@ -1,6 +1,8 @@ ===== trunk ===== 19.10.2011 - revert PHP4 constructor message +- fixed PHP4 constructor message + ===== Smarty-3.1.4 ===== 19.10.2011 - added exception when using PHP4 style constructor diff --git a/libs/sysplugins/smarty_internal_templatebase.php b/libs/sysplugins/smarty_internal_templatebase.php index 2471fc82..65f50224 100644 --- a/libs/sysplugins/smarty_internal_templatebase.php +++ b/libs/sysplugins/smarty_internal_templatebase.php @@ -751,6 +751,9 @@ abstract class Smarty_Internal_TemplateBase extends Smarty_Internal_Data { return false; } } + if ($name == 'Smarty') { + throw new SmartyException("PHP5 requires you to call __construct() instead of Smarty()"); + } // must be unknown throw new SmartyException("Call of unknown method '$name'."); }