diff --git a/NEWS b/NEWS index bb376010..fb95503d 100644 --- a/NEWS +++ b/NEWS @@ -1,4 +1,5 @@ - - append "@" to _run_mod_handler to supress warnings (Monte) + - append "@" to _run_mod_handler and template var echos to + supress possible warnings (Monte) - fix problem with escaped double quotes (Monte) - fix html_radios to not return an array (Monte) - fixed length in modifier.truncate.php (messju) diff --git a/libs/Smarty_Compiler.class.php b/libs/Smarty_Compiler.class.php index a32362d6..bbacd8e5 100644 --- a/libs/Smarty_Compiler.class.php +++ b/libs/Smarty_Compiler.class.php @@ -1498,10 +1498,10 @@ class Smarty_Compiler extends Smarty { $output = $smarty_ref; } else { $var_name = substr(array_shift($indexes), 1); - $output = "\$this->_smarty_vars['$var_name']"; + $output = "@\$this->_smarty_vars['$var_name']"; } } else { - $output = "\$this->_tpl_vars['$var_name']"; + $output = "@\$this->_tpl_vars['$var_name']"; } foreach ($indexes as $index) { @@ -1510,16 +1510,16 @@ class Smarty_Compiler extends Smarty { if (is_numeric($index)) { $output .= "[$index]"; } elseif ($index{0} == '$') { - $output .= "[\$this->_tpl_vars['" . substr($index, 1) . "']]"; + $output .= "[@\$this->_tpl_vars['" . substr($index, 1) . "']]"; } else { $parts = explode('.', $index); $section = $parts[0]; $section_prop = isset($parts[1]) ? $parts[1] : 'index'; - $output .= "[\$this->_sections['$section']['$section_prop']]"; + $output .= "[@\$this->_sections['$section']['$section_prop']]"; } } else if ($index{0} == '.') { if ($index{1} == '$') - $output .= "[\$this->_tpl_vars['" . substr($index, 2) . "']]"; + $output .= "[@\$this->_tpl_vars['" . substr($index, 2) . "']]"; else $output .= "['" . substr($index, 1) . "']"; } else if (substr($index,0,2) == '->') {