MDL-18051: Fixed errors in evalmath when using grade expressions that begin with bracket
This commit is contained in:
@@ -422,7 +422,10 @@ class EvalMathStack {
|
||||
}
|
||||
|
||||
function last($n=1) {
|
||||
return $this->stack[$this->count-$n];
|
||||
if ($this->count - $n >= 0) {
|
||||
return $this->stack[$this->count-$n];
|
||||
}
|
||||
return null;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user