diff --git a/forms/TreeDropdownField.php b/forms/TreeDropdownField.php index 4ceca0924..20c5507b7 100755 --- a/forms/TreeDropdownField.php +++ b/forms/TreeDropdownField.php @@ -49,7 +49,7 @@ class TreeDropdownField extends FormField { if($this->value) { $record = DataObject::get_by_id($this->sourceObject, $this->value); - $title = $record->Title; + $title = ($record) ? $record->Title : _t('DropdownField.CHOOSE', "(Choose)", PR_MEDIUM, 'Start-value of a dropdown');; } else { $title = _t('DropdownField.CHOOSE', "(Choose)", PR_MEDIUM, 'Start-value of a dropdown'); }