- updated error checking at template and config default handler

This commit is contained in:
uwetews
2016-08-05 21:29:15 +02:00
parent 04301645d6
commit 25ad0b3b5a
6 changed files with 34 additions and 12 deletions
@@ -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();