]> git.mjollnir.org Git - moodle.git/commitdiff
MDL-9524 - Formslib gets confused if a required field is frozen. Merged from MOODLE_1...
authortjhunt <tjhunt>
Mon, 23 Apr 2007 16:19:25 +0000 (16:19 +0000)
committertjhunt <tjhunt>
Mon, 23 Apr 2007 16:19:25 +0000 (16:19 +0000)
lib/formslib.php

index baf928c86310c378c811f35c860f8ada5d398474..603cfb725ccfd21aa2e36e3f56945b57c7dd18b4 100644 (file)
@@ -1056,6 +1056,11 @@ class MoodleQuickForm extends HTML_QuickForm_DHTMLRulesTableless {
                 }
             }
         }
+
+        // Fix for MDL-9524. If you don't do this, then $element may be left as a reference to one of the fields in
+        // the form, and then that form field gets corrupted by the code that follows.
+        unset($element);
+
         $js = '
 <script type="text/javascript">
 //<![CDATA[