enrol/ldap: MDL-23424 don't use $CFG->enrol_ldap_user_memberfield if it's not defined
authorInaki <iarenuno@eteo.mondragon.edu>
Tue, 20 Jul 2010 10:28:58 +0000 (10:28 +0000)
committerInaki <iarenuno@eteo.mondragon.edu>
Tue, 20 Jul 2010 10:28:58 +0000 (10:28 +0000)
enrol/ldap/db/install.php

index dc95b0a..7ca9e23 100644 (file)
@@ -96,5 +96,7 @@ function xmldb_enrol_ldap_install() {
     }
 
     // Remove a setting that's never been used at all
-    unset_config('enrol_ldap_user_memberfield');
+    if (isset($CFG->enrol_ldap_user_memberfield)) {
+        unset_config('enrol_ldap_user_memberfield');
+    }
 }