From 1f8c26f25b52d410d126eeeb30f61012094beaaa Mon Sep 17 00:00:00 2001 From: Jean-Michel Vedrine Date: Tue, 2 Jan 2018 22:49:42 +0100 Subject: Small fix to the parser and more Behat tests --- parser.php | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'parser.php') diff --git a/parser.php b/parser.php index 0b08bb7..766797a 100644 --- a/parser.php +++ b/parser.php @@ -1691,7 +1691,7 @@ class qtype_algebra_parser { $i++; continue; } else { - throw new Exception(get_string('missingonearg', 'qtype_algebra', $op)); + throw new Exception(get_string('missingonearg', 'qtype_algebra', $tree[$i]->_value)); } } else if ($tree[$i]->n_args() == 2) { if ($i > 0 and $i < (count($tree) - 1)) { @@ -1701,7 +1701,7 @@ class qtype_algebra_parser { array_splice($tree, $i - 1, 1); continue; } else { - throw new Exception(get_string('missingtwoargs', 'qtype_algebra', $op)); + throw new Exception(get_string('missingtwoargs', 'qtype_algebra', $tree[$i]->_value)); } } } else { -- cgit v1.2.3