MINOR Checking for existence of $searchFields in GridFieldRelationAdd

This commit is contained in:
Ingo Schommer 2012-03-08 23:56:12 +01:00
parent 31ce29fa0b
commit 66f22441e5

View File

@ -237,7 +237,7 @@ class GridFieldRelationAdd implements GridField_HTMLProvider, GridField_ActionPr
return $this->placeholderText;
} else {
$labels = array();
foreach($searchFields as $searchField) {
if($searchFields) foreach($searchFields as $searchField) {
$label = singleton($dataClass)->fieldLabel($searchField);
if($label) $labels[] = $label;
}