add exception for using php4 style constructor

This commit is contained in:
monte.ohrt
2011-10-19 14:32:52 +00:00
parent eea360e87d
commit 0dd7ddb2d1

View File

@@ -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 * Check if a template resource exists
* *