Permalink
Browse files

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().
  • Loading branch information...
1 parent b4bb80b commit c4f7eecfc5d11e45e9ecb1aaf5372208a9c95157 @jamiepratt jamiepratt committed with timhunt Apr 11, 2011
Showing with 1 addition and 0 deletions.
  1. +1 −0 lib/evalmath/evalmath.class.php
@@ -291,6 +291,7 @@ function nfx($expr) {
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 ')'");
}

0 comments on commit c4f7eec

Please sign in to comment.