mirror of
https://github.com/silverstripe/silverstripe-userforms.git
synced 2024-10-22 17:05:42 +02:00
Merge pull request #876 from HARVS1789UK/hotfix/5.4.1
Prevent 'undefined index' warnings with optional country dropdowns
This commit is contained in:
commit
88215b9efb
@ -47,7 +47,7 @@ class EditableCountryDropdownField extends EditableFormField
|
||||
|
||||
public function getValueFromData($data)
|
||||
{
|
||||
if (isset($data[$this->Name])) {
|
||||
if (!empty($data[$this->Name])) {
|
||||
$source = $this->getFormField()->getSource();
|
||||
return $source[$data[$this->Name]];
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user