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:
Ingo Schommer 2008-11-05 15:58:46 +00:00
parent ccd149f689
commit c172e823ea

View File

@ -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');
}