MDL-46054 web_services: wrong key in exception string

This commit is contained in:
Marina Glancy 2014-09-05 14:44:53 +08:00 committed by Juan Leyva
parent dc14212b61
commit bd132709c4

View File

@ -1313,9 +1313,9 @@ class '.$classname.' {
}
}
} else if ($keydesc->required == VALUE_OPTIONAL) {
//it does make sens to declare a parameter VALUE_OPTIONAL
//VALUE_OPTIONAL is used only for array/object key
throw new moodle_exception('parametercannotbevalueoptional');
// It does not make sense to declare a parameter VALUE_OPTIONAL.
// VALUE_OPTIONAL is used only for array/object key.
throw new moodle_exception('erroroptionalparamarray', 'webservice', '', $name);
}
} else { //for the moment we do not support default for other structure types
if ($keydesc->required == VALUE_DEFAULT) {