Skip to content
This repository

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse code

MDL-18051: Fixed errors in evalmath when using grade expressions that…

… begin with bracket
  • Loading branch information...
commit 77464d6be441304e0c096513e5d13d9613c00766 1 parent 369c4ab
sam_marshall authored

Showing 1 changed file with 4 additions and 1 deletion. Show diff stats Hide diff stats

  1. +4 1 lib/evalmath/evalmath.class.php
5 lib/evalmath/evalmath.class.php
@@ -422,7 +422,10 @@ function pop() {
422 422 }
423 423
424 424 function last($n=1) {
425   - return $this->stack[$this->count-$n];
  425 + if ($this->count - $n >= 0) {
  426 + return $this->stack[$this->count-$n];
  427 + }
  428 + return null;
426 429 }
427 430 }
428 431

0 comments on commit 77464d6

Please sign in to comment.
Something went wrong with that request. Please try again.