From: tjhunt Date: Mon, 23 Apr 2007 16:19:25 +0000 (+0000) Subject: MDL-9524 - Formslib gets confused if a required field is frozen. Merged from MOODLE_1... X-Git-Url: http://git.mjollnir.org/gw?a=commitdiff_plain;h=7c77033fb6234ce225744b045e1a2d7e4e92bbf3;p=moodle.git MDL-9524 - Formslib gets confused if a required field is frozen. Merged from MOODLE_18_STABLE. --- diff --git a/lib/formslib.php b/lib/formslib.php index baf928c863..603cfb725c 100644 --- a/lib/formslib.php +++ b/lib/formslib.php @@ -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 = '