mirror of
https://github.com/silverstripe/silverstripe-framework
synced 2024-09-08 10:41:25 +02:00
Merge pull request #4672 from JorisDebonnet/patch-1
Bugfix for DropdownField->castedCopy
This commit is contained in:
commit
91a7e145d4
@ -362,7 +362,9 @@ class DropdownField extends FormField {
|
|||||||
*/
|
*/
|
||||||
public function castedCopy($classOrCopy) {
|
public function castedCopy($classOrCopy) {
|
||||||
$field = parent::castedCopy($classOrCopy);
|
$field = parent::castedCopy($classOrCopy);
|
||||||
|
if(method_exists($field, 'setHasEmptyDefault')) {
|
||||||
$field->setHasEmptyDefault($this->getHasEmptyDefault());
|
$field->setHasEmptyDefault($this->getHasEmptyDefault());
|
||||||
|
}
|
||||||
return $field;
|
return $field;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user