mirror of
https://github.com/smarty-php/smarty.git
synced 2025-10-15 21:45:21 +02:00
- 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:
@@ -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 {
|
||||
|
Reference in New Issue
Block a user