Merge pull request #4690 from camfindlay/patch-32

FIX only use sethasemptydefault if exists.
This commit is contained in:
Damian Mooyman 2015-10-20 16:04:46 +13:00
commit cd12ce584a

View File

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