mirror of
https://github.com/silverstripe/silverstripe-userforms.git
synced 2024-10-22 17:05:42 +02:00
BUGFIX: fixed undefined index when submitting a blank form. Fixes #6272
This commit is contained in:
parent
ed61c03971
commit
6350a66dfb
@ -27,9 +27,13 @@ class EditableMemberListField extends EditableFormField {
|
||||
}
|
||||
|
||||
function getValueFromData($data) {
|
||||
$value = Convert::raw2sql($data[$this->Name]);
|
||||
if(isset($data[$this->Name])) {
|
||||
$value = Convert::raw2sql($data[$this->Name]);
|
||||
|
||||
$member = DataObject::get_one('Member', "Member.ID = {$value}");
|
||||
return ($member) ? $member->getName() : "";
|
||||
$member = DataObject::get_one('Member', "Member.ID = {$value}");
|
||||
return ($member) ? $member->getName() : "";
|
||||
}
|
||||
|
||||
return false;
|
||||
}
|
||||
}
|
Loading…
Reference in New Issue
Block a user