mirror of
https://github.com/smarty-php/smarty.git
synced 2025-08-04 10:24:26 +02:00
allowed "_" in the name of variable-parameters to {math}-function
This commit is contained in:
@@ -25,7 +25,7 @@ function smarty_function_math($params, &$smarty)
|
||||
}
|
||||
|
||||
// match all vars in equation, make sure all are passed
|
||||
preg_match_all("![a-zA-Z][a-zA-Z0-9]*!",$equation, $match);
|
||||
preg_match_all("![a-zA-Z][a-zA-Z0-9_]*!",$equation, $match);
|
||||
$allowed_funcs = array('int','abs','ceil','cos','exp','floor','log','log10',
|
||||
'max','min','pi','pow','rand','round','sin','sqrt','srand','tan');
|
||||
|
||||
|
Reference in New Issue
Block a user