Skip to content

Commit

Permalink
trim query
Browse files Browse the repository at this point in the history
  • Loading branch information
cradeck committed Jul 25, 2023
1 parent 01e09bd commit 3331161
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion Classes/Service/SolrServiceProvider.php
Original file line number Diff line number Diff line change
Expand Up @@ -1144,7 +1144,11 @@ protected function queryComponentsForQueryParameters(array $queryParameters): ar
// a) just a single string (e.g. text field)
// b) array of strings (e.g. date range field)
// c) single field with additional configuration (e.g. text field with alternate query)
$queryArguments = $queryParameters[$fieldID];
if(is_string($queryParameters[$fieldID])) {
$queryArguments = trim($queryParameters[$fieldID]);
} else {
$queryArguments = $queryParameters[$fieldID];
}
$queryAlternate = null;
$queryTerms = null;
if (is_array($queryArguments) && array_key_exists('alternate', $queryArguments) && array_key_exists('queryAlternate', $fieldInfo)) {
Expand Down

0 comments on commit 3331161

Please sign in to comment.