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