BUGFIX: fixed undefined index when submitting a blank form. Fixes #6272

This commit is contained in:
Will Rossiter 2011-01-18 16:15:57 +13:00
parent ed61c03971
commit 6350a66dfb

View File

@ -27,9 +27,13 @@ class EditableMemberListField extends EditableFormField {
}
function getValueFromData($data) {
if(isset($data[$this->Name])) {
$value = Convert::raw2sql($data[$this->Name]);
$member = DataObject::get_one('Member', "Member.ID = {$value}");
return ($member) ? $member->getName() : "";
}
return false;
}
}