mirror of
https://github.com/smarty-php/smarty.git
synced 2025-08-05 02:44:27 +02:00
fixed handling of methods arguments.
thanks to Manfred Wischin for finding this one and providing the conceptual fix.
This commit is contained in:
1
NEWS
1
NEWS
@@ -1,3 +1,4 @@
|
||||
- fix handling of methods arguments (messju, Manfred Wischin)
|
||||
- remove touch() call that made the compiled-template's timestamp the
|
||||
same as the source-template's one. (messju)
|
||||
- add assign attribute to html_checkboxes and html_radios
|
||||
|
@@ -1811,12 +1811,13 @@ class Smarty_Compiler extends Smarty {
|
||||
function _parse_parenth_args($parenth_args)
|
||||
{
|
||||
preg_match_all('!' . $this->_param_regexp . '!',$parenth_args, $match);
|
||||
$match = $match[0];
|
||||
rsort($match);
|
||||
reset($match);
|
||||
$orig_vals = $match;
|
||||
$orig_vals = $match = $match[0];
|
||||
$this->_parse_vars_props($match);
|
||||
return str_replace($orig_vals, $match, $parenth_args);
|
||||
$replace = array();
|
||||
for ($i = 0, $count = count($match); $i < $count; $i++) {
|
||||
$replace[$orig_vals[$i]] = $match[$i];
|
||||
}
|
||||
return strtr($parenth_args, $replace);
|
||||
}
|
||||
|
||||
/**
|
||||
|
Reference in New Issue
Block a user