From 1458d5b9731d8d0fde6d85df09f0643f8055ac47 Mon Sep 17 00:00:00 2001 From: Sean Harvey Date: Thu, 13 Nov 2008 01:43:38 +0000 Subject: [PATCH] BUGFIX Fixed deletion of RedirectorPage git-svn-id: svn://svn.silverstripe.com/silverstripe/open/modules/sapphire/trunk@65769 467b73ca-7a2a-4603-9d3b-597d59a354a9 --- forms/TreeDropdownField.php | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/forms/TreeDropdownField.php b/forms/TreeDropdownField.php index eb53dbc0e..ff78b27fe 100755 --- a/forms/TreeDropdownField.php +++ b/forms/TreeDropdownField.php @@ -124,8 +124,9 @@ HTML; function performReadonlyTransformation() { $fieldName = $this->labelField; + $value = ($this->getByKey($this->value)) ? $this->getByKey($this->value)->$fieldName : ''; $source = array( - $this->value => $this->getByKey($this->value)->$fieldName + $this->value => $value ); $field = new LookupField($this->name, $this->title, $source); $field->setValue($this->value);