- 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
@@ -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;
}
@@ -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("? >\n<?php","? ><?php"), array('',''), $this->parser->retvalue);