Merge branch 'MDL-35198' of git://github.com/mouneyrac/moodle

This commit is contained in:
Sam Hemelryk 2012-10-16 11:23:24 +08:00
commit 8422094d91
8 changed files with 14 additions and 14 deletions

View file

@ -100,7 +100,7 @@ class enrol_manual_external extends external_api {
// Throw an exception if user is not able to assign the role.
$roles = get_assignable_roles($context);
if (!key_exists($enrolment['roleid'], $roles)) {
if (!array_key_exists($enrolment['roleid'], $roles)) {
$errorparams = new stdClass();
$errorparams->roleid = $enrolment['roleid'];
$errorparams->courseid = $enrolment['courseid'];