mirror of
https://github.com/smarty-php/smarty.git
synced 2025-08-05 02:44:27 +02:00
fix handling of $var.key inside []
This commit is contained in:
1
NEWS
1
NEWS
@@ -1,3 +1,4 @@
|
||||
- fix handling of $var.key inside [] (messju)
|
||||
- fix handling of assign inside {insert}-tags (messju)
|
||||
- fix handling if [...] inside triple-quotes in config-files (messju)
|
||||
- fix handling of simple-math-operators inside modifiers (Dominik, messju)
|
||||
|
@@ -1674,7 +1674,11 @@ class Smarty_Compiler extends Smarty {
|
||||
if (is_numeric($_index)) {
|
||||
$_output .= "[$_index]";
|
||||
} elseif ($_index{0} == '$') {
|
||||
if (strpos($_index, '.') !== false) {
|
||||
$_output .= '[' . $this->_parse_var($_index) . ']';
|
||||
} else {
|
||||
$_output .= "[\$this->_tpl_vars['" . substr($_index, 1) . "']]";
|
||||
}
|
||||
} else {
|
||||
$_var_parts = explode('.', $_index);
|
||||
$_var_section = $_var_parts[0];
|
||||
|
Reference in New Issue
Block a user