From 85658fcdd47c977c0ebe82d34df12501a20d1212 Mon Sep 17 00:00:00 2001 From: "uwe.tews@googlemail.com" Date: Wed, 19 Oct 2011 19:49:27 +0000 Subject: [PATCH] - fixed PHP4 constructor message --- change_log.txt | 2 ++ libs/sysplugins/smarty_internal_templatebase.php | 3 +++ 2 files changed, 5 insertions(+) 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'."); }