mirror of
https://github.com/silverstripe/silverstripe-framework
synced 2024-10-22 14:05:37 +02:00
BUGFIX Using empty title in TreeDropdownField->Field() if the related DataObject cannot be found
git-svn-id: svn://svn.silverstripe.com/silverstripe/open/modules/sapphire/trunk@65293 467b73ca-7a2a-4603-9d3b-597d59a354a9
This commit is contained in:
parent
ccd149f689
commit
c172e823ea
@ -43,7 +43,7 @@ class TreeDropdownField extends FormField {
|
||||
|
||||
if($this->value) {
|
||||
$record = DataObject::get_by_id($this->sourceObject, $this->value);
|
||||
$title = $record->Title;
|
||||
$title = ($record) ? $record->Title : '';
|
||||
} else {
|
||||
$title = _t('DropdownField.CHOOSE', "(Choose)", PR_MEDIUM, 'Start-value of a dropdown');
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user