diff --git a/libs/Smarty.class.php b/libs/Smarty.class.php index fd9dc627..807d6706 100644 --- a/libs/Smarty.class.php +++ b/libs/Smarty.class.php @@ -665,6 +665,15 @@ class Smarty extends Smarty_Internal_TemplateBase { } } + + /** + * Throw error when using PHP 4 style constructor + */ + public function Smarty() + { + throw new SmartyException("PHP5 requires you to call __construct() instead of Smarty()"); + } + /** * Check if a template resource exists * @@ -1454,4 +1463,4 @@ function smartyAutoload($class) } } -?> \ No newline at end of file +?>