diff --git a/libs/plugins/function.math.php b/libs/plugins/function.math.php index fe4c0bbf..71672fea 100644 --- a/libs/plugins/function.math.php +++ b/libs/plugins/function.math.php @@ -58,7 +58,7 @@ function smarty_function_math($params, &$smarty) $smarty->trigger_error("math: parameter $key: is not numeric"); return; } - $equation = preg_replace("/\b$key\b/",$val, $equation); + $equation = preg_replace("/\b$key\b/", " \$params['$key'] ", $equation); } }