MDL-27139 "mathslib used by gradebook incorrectly evaluating

expressions" simple fix needed to prevent problem with operator
following expression with no operands such as pi().
This commit is contained in:
jamiepratt
2011-06-23 12:33:28 +01:00
committed by Tim Hunt
parent b4bb80b7d6
commit c4f7eecfc5
+1
View File
@@ -291,6 +291,7 @@ class EvalMath {
return $this->trigger("wrong number of arguments ($arg_count given, " . implode('/',$this->fc[$fnn]) . " expected)");
$output[] = array('fn'=>$fn, 'fnn'=>$fnn, 'argcount'=>0); // send function to output
$index++;
$expecting_op = true;
} else {
return $this->trigger("unexpected ')'");
}