FIX: Undefined variable in TreeDropdownField.php

I'm guessing this was just a simple typo. Checked this by searching on SiteTree, behaves as expected after this change.
This commit is contained in:
Loz Calver 2013-10-02 15:41:39 +01:00
parent 837304b81b
commit 9b0564b7d6

View File

@ -434,7 +434,7 @@ class TreeDropdownField extends FormField {
$sourceObject = $this->sourceObject;
$wheres = array();
if(singleton($sourceObject)->hasDatabaseField($this->labelField)) {
$wheres[] = "\"$searchField\" LIKE '%$this->search%'";
$wheres[] = "\"$this->labelField\" LIKE '%$this->search%'";
} else {
if(singleton($sourceObject)->hasDatabaseField('Title')) {
$wheres[] = "\"Title\" LIKE '%$this->search%'";