Merge pull request #4672 from JorisDebonnet/patch-1

Bugfix for DropdownField->castedCopy
This commit is contained in:
Damian Mooyman 2015-10-09 12:25:43 +13:00
commit 91a7e145d4

View File

@ -362,7 +362,9 @@ class DropdownField extends FormField {
*/
public function castedCopy($classOrCopy) {
$field = parent::castedCopy($classOrCopy);
$field->setHasEmptyDefault($this->getHasEmptyDefault());
if(method_exists($field, 'setHasEmptyDefault')) {
$field->setHasEmptyDefault($this->getHasEmptyDefault());
}
return $field;
}
}