mirror of
https://github.com/Lastorder-DC/rhymix.git
synced 2026-01-10 04:03:01 +09:00
Also trigger warning when template is not found
This commit is contained in:
parent
7e5356380f
commit
78a0e857b5
1 changed files with 6 additions and 2 deletions
|
|
@ -123,7 +123,9 @@ class TemplateHandler
|
|||
// if target file does not exist exit
|
||||
if(!$this->file || !file_exists($this->file))
|
||||
{
|
||||
return escape("Template not found: ${tpl_path}${tpl_filename}" . ($tpl_file ? " (${tpl_file})" : ''));
|
||||
$error_message = "Template not found: ${tpl_path}${tpl_filename}" . ($tpl_file ? " (${tpl_file})" : '');
|
||||
trigger_error($error_message, \E_USER_WARNING);
|
||||
return escape($error_message);
|
||||
}
|
||||
|
||||
// for backward compatibility
|
||||
|
|
@ -184,7 +186,9 @@ class TemplateHandler
|
|||
// if target file does not exist exit
|
||||
if(!$this->file || !file_exists($this->file))
|
||||
{
|
||||
return escape("Template not found: ${tpl_path}${tpl_filename}");
|
||||
$error_message = "Template not found: ${tpl_path}${tpl_filename}";
|
||||
trigger_error($error_message, \E_USER_WARNING);
|
||||
return escape($error_message);
|
||||
}
|
||||
|
||||
return $this->parse();
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue