diff --git a/htdocs/core/class/evalmath.class.php b/htdocs/core/class/evalmath.class.php index 984324a7563..7e02aa57032 100644 --- a/htdocs/core/class/evalmath.class.php +++ b/htdocs/core/class/evalmath.class.php @@ -270,10 +270,11 @@ class EvalMath // =============== } elseif ($op == ')' and $expecting_op) { // ready to close a parenthesis? while (($o2 = $stack->pop()) != '(') { // pop off the stack back to the last ( - if (is_null($o2)) + if (is_null($o2)) { return $this->trigger(5, "unexpected ')'", ")"); - else + } else { $output[] = $o2; + } } if (preg_match("/^([a-z]\w*)\($/", $stack->last(2), $matches)) { // did we just close a function? $fnn = $matches[1]; // get the function name @@ -293,10 +294,11 @@ class EvalMath // =============== } elseif ($op == ',' and $expecting_op) { // did we just finish a function argument? while (($o2 = $stack->pop()) != '(') { - if (is_null($o2)) + if (is_null($o2)) { return $this->trigger(5, "unexpected ','", ","); // oops, never had a ( - else + } else { $output[] = $o2; // pop the argument expression stuff and push onto the output + } } // make sure there was a function if (!preg_match("/^([a-z]\w*)\($/", $stack->last(2), $matches))