From e8ca6884531a3162cf755d7c09c29e7933c84090 Mon Sep 17 00:00:00 2001 From: Frederic Massart Date: Fri, 10 May 2013 08:34:59 +0800 Subject: [PATCH] MDL-38885 form: Fix comments --- lib/formslib.php | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/lib/formslib.php b/lib/formslib.php index d313f0222d7..ddd2beb9617 100644 --- a/lib/formslib.php +++ b/lib/formslib.php @@ -1512,10 +1512,11 @@ class MoodleQuickForm extends HTML_QuickForm_DHTMLRulesTableless { * Now if you call this method passing 'foo', along with the submitted values of 'foo': * array(0 => '1.23', 1 => '10'), you will get an array telling you that the key 0 is a * FLOAT and 1 is an INT. If you had passed 'foo[1]', along with its value '10', you would - * get the default value returned. + * get the default clean type returned (param $default). * * @param string $elementname name of the element. * @param mixed $value value that should be cleaned. + * @param int $default default constant value to be returned (PARAM_...) * @return string|array constant value or array of constant values (PARAM_...) */ public function getCleanType($elementname, $value, $default = PARAM_RAW) { @@ -1560,7 +1561,7 @@ class MoodleQuickForm extends HTML_QuickForm_DHTMLRulesTableless { } else if (!is_array($type) && is_array($value)) { $value = clean_param_array($value, $type, true); } else { - throw new coding_exception('Unexpected type or value received in MoodleQuickForm::cleanValue()'); + throw new coding_exception('Unexpected type or value received in MoodleQuickForm::getCleanedValue()'); } return $value; }