From: tjhunt Date: Wed, 29 Oct 2008 06:54:32 +0000 (+0000) Subject: Fix and improve error message. X-Git-Url: http://git.mjollnir.org/gw?a=commitdiff_plain;h=10e99feaa2869643e4dba091597b20a4d8aa4b53;p=moodle.git Fix and improve error message. --- 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