]> git.mjollnir.org Git - moodle.git/commitdiff
Fix and improve error message.
authortjhunt <tjhunt>
Wed, 29 Oct 2008 06:54:32 +0000 (06:54 +0000)
committertjhunt <tjhunt>
Wed, 29 Oct 2008 06:54:32 +0000 (06:54 +0000)
lib/dml/moodle_database.php

index b1dfe102f3c28083acb06e5f6c8e26f6973d3b88..0caffa529638622c835f2bfbff55736ef7e3293e 100644 (file)
@@ -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