MDL-27375 add missing lowercasing of external column names
[moodle.git] / enrol / database / lib.php
index 818b05e..987e0e7 100644 (file)
@@ -111,6 +111,7 @@ class enrol_database_plugin extends enrol_plugin {
         if ($rs = $extdb->Execute($sql)) {
             if (!$rs->EOF) {
                 while ($fields = $rs->FetchRow()) {
         if ($rs = $extdb->Execute($sql)) {
             if (!$rs->EOF) {
                 while ($fields = $rs->FetchRow()) {
+                    $fields = array_change_key_case($fields, CASE_LOWER);
                     $fields = $this->db_decode($fields);
 
                     if (empty($fields[$coursefield])) {
                     $fields = $this->db_decode($fields);
 
                     if (empty($fields[$coursefield])) {