mirror of
https://github.com/smarty-php/smarty.git
synced 2025-08-05 10:54:27 +02:00
- bugfix of problem introduced with r4342 on math plugin
This commit is contained in:
@@ -1,6 +1,7 @@
|
||||
===== trunk =====
|
||||
04.10.2011
|
||||
- bugfix assign() in plugins called in subtemplates did change value also in parent template
|
||||
- bugfix of problem introduced with r4342 on math plugin
|
||||
|
||||
===== Smarty-3.1.2 =====
|
||||
03.10.2011
|
||||
|
@@ -24,8 +24,8 @@
|
||||
function smarty_function_math($params, $template)
|
||||
{
|
||||
static $_allowed_funcs = array(
|
||||
'int' => true, 'abs' => true, 'ceil' => true, 'cos' => true, 'exp' => true, 'floor' => true,
|
||||
'log' => true, 'log10' => true, 'max' => true, 'min' => true, 'pi' => true, 'pow' => true,
|
||||
'int' => true, 'abs' => true, 'ceil' => true, 'cos' => true, 'exp' => true, 'floor' => true,
|
||||
'log' => true, 'log10' => true, 'max' => true, 'min' => true, 'pi' => true, 'pow' => true,
|
||||
'rand' => true, 'round' => true, 'sin' => true, 'sqrt' => true, 'srand' => true ,'tan' => true
|
||||
);
|
||||
// be sure equation parameter is present
|
||||
@@ -55,7 +55,7 @@ function smarty_function_math($params, $template)
|
||||
foreach($params as $key => $val) {
|
||||
if ($key != "equation" && $key != "format" && $key != "assign") {
|
||||
// make sure value is not empty
|
||||
if (isset($val[0])) {
|
||||
if (strlen($val)==0) {
|
||||
trigger_error("math: parameter $key is empty",E_USER_WARNING);
|
||||
return;
|
||||
}
|
||||
|
Reference in New Issue
Block a user