diff --git a/classes/template/TemplateHandler.class.php b/classes/template/TemplateHandler.class.php index 379f739b5..e3415dea6 100644 --- a/classes/template/TemplateHandler.class.php +++ b/classes/template/TemplateHandler.class.php @@ -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); }