Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
MDL-59984 enrol: Fix parameter naming for enrol conditions sql
* The character "." can't be used for sql named parameters.
  • Loading branch information
junpataleta committed Oct 16, 2017
1 parent 9a316f3 commit d1b55a3
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions lib/enrollib.php
Expand Up @@ -1419,8 +1419,8 @@ function get_enrolled_join(context $context, $useridcolumn, $onlyactive = false,
"{$prefix}e1.courseid = :{$prefix}_e1_courseid",
);
if ($enrolid) {
$enrolconditions[] = "{$prefix}e1.id = :{$prefix}e1.enrolid";
$params[$prefix . 'e1.enrolid'] = $enrolid;
$enrolconditions[] = "{$prefix}e1.id = :{$prefix}e1_enrolid";
$params[$prefix . 'e1_enrolid'] = $enrolid;
}
$enrolconditionssql = implode(" AND ", $enrolconditions);
$joins[] = "JOIN {enrol} {$prefix}e1 ON ($enrolconditionssql)";
Expand Down

0 comments on commit d1b55a3

Please sign in to comment.