mirror of
https://github.com/silverstripe/silverstripe-framework
synced 2024-10-22 14:05:37 +02:00
Merge pull request #4690 from camfindlay/patch-32
FIX only use sethasemptydefault if exists.
This commit is contained in:
commit
cd12ce584a
@ -362,7 +362,9 @@ class DropdownField extends FormField {
|
||||
*/
|
||||
public function castedCopy($classOrCopy) {
|
||||
$field = parent::castedCopy($classOrCopy);
|
||||
if($field->hasMethod('setHasEmptyDefault')) {
|
||||
$field->setHasEmptyDefault($this->getHasEmptyDefault());
|
||||
}
|
||||
return $field;
|
||||
}
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user