Bugfix for DropdownField->castedCopy

The Newsletter module crashed on it when viewing a sent Newsletter.
This commit is contained in:
JorisDebonnet 2015-10-08 19:02:47 +02:00
parent a1e4db6a6d
commit f6a1e5ec30

View File

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