From 10e99feaa2869643e4dba091597b20a4d8aa4b53 Mon Sep 17 00:00:00 2001 From: tjhunt Date: Wed, 29 Oct 2008 06:54:32 +0000 Subject: [PATCH] Fix and improve error message. --- lib/dml/moodle_database.php | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/lib/dml/moodle_database.php b/lib/dml/moodle_database.php index b1dfe102f3..0caffa5296 100644 --- a/lib/dml/moodle_database.php +++ b/lib/dml/moodle_database.php @@ -418,7 +418,10 @@ abstract class moodle_database { } if ($count > count($params)) { - throw new dml_exception('invalidqueryparam'); + $a = new stdClass; + $a->expected = $count; + $a->actual = count($params); + throw new dml_exception('invalidqueryparam', $a); } if ($type & $allowed_types) { // bitwise AND -- 2.39.5