mirror of
https://github.com/silverstripe/silverstripe-reports
synced 2024-10-22 11:05:53 +02:00
BUG Check for the parameter existence.
The specific situation is if the SearchForm.ss is overriden, and the $SearchQuery parameter is used in the template. This will throw a Notice in case the form is rendered without searching.
This commit is contained in:
parent
abc87a4f8f
commit
ee2b1a9070
@ -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']);
|
||||
}
|
||||
|
||||
/**
|
||||
|
Loading…
Reference in New Issue
Block a user