Fix search form ending in dash error
On the search form if a user's search ends in a dash it will cause a server error. This change fixes this problem by trimming dashes and spaces from the end of the search term.
This commit is contained in:
parent
6f24df9299
commit
298ff4a9d6
|
@ -146,7 +146,7 @@ class SearchForm extends Form
|
|||
}
|
||||
}
|
||||
|
||||
$keywords = $request->requestVar('Search');
|
||||
$keywords = rtrim($request->requestVar('Search'), '- ');
|
||||
|
||||
$andProcessor = function ($matches) {
|
||||
return ' +' . $matches[2] . ' +' . $matches[4] . ' ';
|
||||
|
|
Loading…
Reference in New Issue