Merge pull request #165 from silverstripe-droptables/search-form-fix

BUG: Check for the parameter existence.
This commit is contained in:
Will Rossiter 2012-08-04 23:18:45 -07:00
commit 5938ab06ba
1 changed files with 2 additions and 1 deletions

View File

@ -172,7 +172,8 @@ class SearchForm extends Form {
// legacy usage: $data was defaulting to $_REQUEST, parameter not passed in doc.silverstripe.org tutorials
if(!isset($data)) $data = $_REQUEST;
return Convert::raw2xml($data['Search']);
// The form could be rendered without the search being done, so check for that.
if (isset($data['Search'])) return Convert::raw2xml($data['Search']);
}
/**