MDL-27375 add missing lowercasing of external column names
authorPetr Skoda <commits@skodak.org>
Sat, 2 Jul 2011 13:16:02 +0000 (15:16 +0200)
committerPetr Skoda <commits@skodak.org>
Sat, 2 Jul 2011 13:16:02 +0000 (15:16 +0200)
Credit goes to Gail Preuninger.

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()) {
+                    $fields = array_change_key_case($fields, CASE_LOWER);
                     $fields = $this->db_decode($fields);
 
                     if (empty($fields[$coursefield])) {