- bugfix of problem introduced with r4342 on math plugin

This commit is contained in:
uwe.tews@googlemail.com
2011-10-04 16:38:12 +00:00
parent dbda42bc6c
commit 4cb1e143cc
2 changed files with 4 additions and 3 deletions

View File

@@ -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

View File

@@ -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;
}