mirror of
https://github.com/smarty-php/smarty.git
synced 2026-05-06 08:26:19 +02:00
- updated error checking at template and config default handler
This commit is contained in:
@@ -146,6 +146,11 @@ class Smarty_Template_Compiled extends Smarty_Template_Resource_Base
|
||||
*/
|
||||
public function render(Smarty_Internal_Template $_template)
|
||||
{
|
||||
// checks if template exists
|
||||
if (!$_template->source->exists) {
|
||||
$type = $_template->source->isConfig ? 'config' : 'template';
|
||||
throw new SmartyException("Unable to load {$type} '{$_template->source->type}:{$_template->source->name}'");
|
||||
}
|
||||
if ($_template->smarty->debugging) {
|
||||
if (!isset($_template->smarty->_debug)) {
|
||||
$_template->smarty->_debug = new Smarty_Internal_Debug();
|
||||
|
||||
Reference in New Issue
Block a user