mirror of
https://github.com/Lastorder-DC/rhymix.git
synced 2026-01-04 01:01:41 +09:00
Fix #1790 duplicate .html extension in TemplateHandler error message
This commit is contained in:
parent
9b5ebb3a79
commit
454d2d85ff
1 changed files with 9 additions and 2 deletions
|
|
@ -144,7 +144,11 @@ class TemplateHandler
|
|||
if(!$this->file || !file_exists($this->file))
|
||||
{
|
||||
$tpl_path = rtrim(str_replace('\\', '/', $tpl_path), '/') . '/';
|
||||
$error_message = "Template not found: ${tpl_path}${tpl_filename}.html" . ($tpl_file ? " (${tpl_file})" : '');
|
||||
$error_message = vsprintf('Template not found: %s%s%s', array(
|
||||
$tpl_path,
|
||||
preg_replace('/\.html$/i', '', $tpl_filename) . '.html',
|
||||
$tpl_file ? " (${tpl_file})" : '',
|
||||
));
|
||||
trigger_error($error_message, \E_USER_WARNING);
|
||||
return escape($error_message);
|
||||
}
|
||||
|
|
@ -213,7 +217,10 @@ class TemplateHandler
|
|||
if(!$this->file || !file_exists($this->file))
|
||||
{
|
||||
$tpl_path = rtrim(str_replace('\\', '/', $tpl_path), '/') . '/';
|
||||
$error_message = "Template not found: ${tpl_path}${tpl_filename}.html";
|
||||
$error_message = vsprintf('Template not found: %s%s', array(
|
||||
$tpl_path,
|
||||
preg_replace('/\.html$/i', '', $tpl_filename) . '.html',
|
||||
));
|
||||
trigger_error($error_message, \E_USER_WARNING);
|
||||
return escape($error_message);
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue