mirror of
https://github.com/smarty-php/smarty.git
synced 2025-08-05 02:44:27 +02:00
add exception for using php4 style constructor
This commit is contained in:
@@ -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
|
||||||
*
|
*
|
||||||
@@ -1454,4 +1463,4 @@ function smartyAutoload($class)
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
?>
|
?>
|
||||||
|
Reference in New Issue
Block a user