BUGFIX: getByKey replaced with objectForKey (from r97307)

git-svn-id: svn://svn.silverstripe.com/silverstripe/open/modules/sapphire/trunk@102442 467b73ca-7a2a-4603-9d3b-597d59a354a9
This commit is contained in:
Ingo Schommer 2010-04-12 05:01:09 +00:00
parent 40466ccb02
commit d2e310a773

View File

@ -277,7 +277,7 @@ class TreeDropdownField_Readonly extends TreeDropdownField {
function Field() {
$fieldName = $this->labelField;
if($this->value) {
$keyObj = $this->getByKey($this->value);
$keyObj = $this->objectForKey($this->value);
$obj = $keyObj ? $keyObj->$fieldName : '';
} else {
$obj = null;