From 51ee8c4ad91ed3e7b86e941fa10bbd7e95d746dd Mon Sep 17 00:00:00 2001 From: "Uwe.Tews@googlemail.com" Date: Tue, 1 Oct 2013 18:48:29 +0000 Subject: [PATCH] - use current delimiters in compiler error messages (issue 157) --- change_log.txt | 3 +++ libs/sysplugins/smarty_internal_compilebase.php | 2 +- libs/sysplugins/smarty_internal_smartytemplatecompiler.php | 2 +- 3 files changed, 5 insertions(+), 2 deletions(-) diff --git a/change_log.txt b/change_log.txt index 39c94e0a..2870aec9 100644 --- a/change_log.txt +++ b/change_log.txt @@ -1,4 +1,7 @@ ===== trunk ===== +01.10.2013 + - use current delimiters in compiler error messages (issue 157) + 17.09.2013 - improvement added patch for additional SmartyCompilerException properties for better access to scource information (forum topic 24559) diff --git a/libs/sysplugins/smarty_internal_compilebase.php b/libs/sysplugins/smarty_internal_compilebase.php index 909880f6..8f142e25 100644 --- a/libs/sysplugins/smarty_internal_compilebase.php +++ b/libs/sysplugins/smarty_internal_compilebase.php @@ -163,7 +163,7 @@ abstract class Smarty_Internal_CompileBase } } // wrong nesting of tags - $compiler->trigger_template_error("unclosed {" . $_openTag . "} tag"); + $compiler->trigger_template_error("unclosed {$compiler->smarty->left_delimiter}" . $_openTag . "{$compiler->smarty->right_delimiter} tag"); return; } diff --git a/libs/sysplugins/smarty_internal_smartytemplatecompiler.php b/libs/sysplugins/smarty_internal_smartytemplatecompiler.php index 2f73b91f..8e0d22f1 100644 --- a/libs/sysplugins/smarty_internal_smartytemplatecompiler.php +++ b/libs/sysplugins/smarty_internal_smartytemplatecompiler.php @@ -119,7 +119,7 @@ class Smarty_Internal_SmartyTemplateCompiler extends Smarty_Internal_TemplateCom if (count($this->_tag_stack) > 0) { // get stacked info list($openTag, $_data) = array_pop($this->_tag_stack); - $this->trigger_template_error("unclosed {" . $openTag . "} tag"); + $this->trigger_template_error("unclosed {$this->smarty->left_delimiter}" . $openTag . "{$this->smarty->right_delimiter} tag"); } // return compiled code // return str_replace(array("? >\nparser->retvalue);