aboutsummaryrefslogtreecommitdiff
path: root/parser.php
diff options
context:
space:
mode:
authorJean-Michel Vedrine <vedrine@vedrine.org>2018-01-02 22:49:42 +0100
committerJean-Michel Vedrine <vedrine@vedrine.org>2018-01-02 22:49:42 +0100
commit1f8c26f25b52d410d126eeeb30f61012094beaaa (patch)
tree2100701a3c96d28b4236f527815ca94a369d3ca0 /parser.php
parent6e9f189cdba529e41c345abfd26ffecaede65c4b (diff)
Small fix to the parser and more Behat tests
Diffstat (limited to 'parser.php')
-rw-r--r--parser.php4
1 files changed, 2 insertions, 2 deletions
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 {