Permalink
Browse files

MINOR Checking for existence of $searchFields in GridFieldRelationAdd

  • Loading branch information...
1 parent 31ce29f commit 66f22441e5f87a022337bfbca0b701cafb68b5bd @chillu chillu committed Mar 8, 2012
Showing with 1 addition and 1 deletion.
  1. +1 −1 forms/gridfield/GridFieldRelationAdd.php
View
2 forms/gridfield/GridFieldRelationAdd.php
@@ -237,7 +237,7 @@ public function getPlaceholderText($dataClass) {
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;
}

0 comments on commit 66f2244

Please sign in to comment.