From fd617658efd5c51a822eea2d816de81ca7942292 Mon Sep 17 00:00:00 2001 From: Laurent Destailleur Date: Fri, 3 Jul 2020 00:36:56 +0200 Subject: [PATCH] Fix syntax --- htdocs/core/class/evalmath.class.php | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) 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))