- use current delimiters in compiler error messages (issue 157)

This commit is contained in:
Uwe.Tews@googlemail.com
2013-10-01 18:48:29 +00:00
parent 5bbfbafc47
commit 51ee8c4ad9
3 changed files with 5 additions and 2 deletions

View File

@@ -1,4 +1,7 @@
===== trunk ===== ===== trunk =====
01.10.2013
- use current delimiters in compiler error messages (issue 157)
17.09.2013 17.09.2013
- improvement added patch for additional SmartyCompilerException properties for better access to scource information (forum topic 24559) - improvement added patch for additional SmartyCompilerException properties for better access to scource information (forum topic 24559)

View File

@@ -163,7 +163,7 @@ abstract class Smarty_Internal_CompileBase
} }
} }
// wrong nesting of tags // 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; return;
} }

View File

@@ -119,7 +119,7 @@ class Smarty_Internal_SmartyTemplateCompiler extends Smarty_Internal_TemplateCom
if (count($this->_tag_stack) > 0) { if (count($this->_tag_stack) > 0) {
// get stacked info // get stacked info
list($openTag, $_data) = array_pop($this->_tag_stack); 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 compiled code
// return str_replace(array("? >\n<?php","? ><?php"), array('',''), $this->parser->retvalue); // return str_replace(array("? >\n<?php","? ><?php"), array('',''), $this->parser->retvalue);