- create exception on recursive {extends} calls

- fixed reported line number at "unexpected closing tag " exception
- bugfix on escape:'mail' modifier
- drop exception if 'item' variable is equal 'from' variable in {foreach} tag
This commit is contained in:
Uwe.Tews
2010-07-06 20:00:41 +00:00
parent cbe2f3356f
commit c83ef6792c
6 changed files with 85 additions and 63 deletions

View File

@@ -31,6 +31,10 @@ class Smarty_Internal_Compile_Foreach extends Smarty_Internal_CompileBase {
$from = $_attr['from'];
$item = $_attr['item'];
if (substr_compare("\$_smarty_tpl->getVariable($item)", $from,0, strlen("\$_smarty_tpl->getVariable($item)")) == 0) {
$this->compiler->trigger_template_error("item parameter {$item} may not be the same parameter at 'from'");
}
if (isset($_attr['key'])) {
$key = $_attr['key'];
} else {