MDL-26234 fix fatal user upload error when custom text area field present

Please note this does not fix problems with the actual upload of custon text area fields.
This commit is contained in:
Petr Skoda
2011-02-06 20:57:21 +01:00
parent 54b7b5993f
commit bb98eea114
+7 -1
View File
@@ -295,7 +295,13 @@ if ($formdata = $mform->is_cancelled()) {
}
if (isset($formdata->$field)) {
// process templates
$user->$field = process_template($formdata->$field, $user);
if (is_array($formdata->$field)) {
foreach ($formdata->$field as $k=>$v) {
$user->$field[$k] = process_template($v, $user);
}
} else {
$user->$field = process_template($formdata->$field, $user);
}
}
}