Skip to content

Commit

Permalink
[TASK] Provide default arguments for str_getcsv
Browse files Browse the repository at this point in the history
  • Loading branch information
georgringer committed Nov 25, 2024
1 parent 5206c21 commit f804f56
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion Classes/Backend/RecordList/RecordListConstraint.php
Original file line number Diff line number Diff line change
Expand Up @@ -51,7 +51,7 @@ public function extendQuery(array &$parameters, array $arguments): void
$fieldParts = [];
foreach ($fields as $field) {
$likeParts = [];
$nameParts = str_getcsv($arguments['searchWord'], ' ');
$nameParts = str_getcsv($arguments['searchWord'], ' ', '"', '\\');
foreach ($nameParts as $part) {
$part = trim($part);
if ($part !== '') {
Expand Down
2 changes: 1 addition & 1 deletion Classes/Domain/Repository/NewsRepository.php
Original file line number Diff line number Diff line change
Expand Up @@ -445,7 +445,7 @@ protected function getSearchConstraints(QueryInterface $query, DemandInterface $
if (count($searchFields) === 0) {
throw new \UnexpectedValueException('No search fields defined', 1318497755);
}
$searchSubjectSplitted = str_getcsv($searchSubject, ' ');
$searchSubjectSplitted = str_getcsv($searchSubject, ' ', '"', '\\');
if ($searchObject->isSplitSubjectWords()) {
foreach ($searchFields as $field) {
$subConstraints = [];
Expand Down

0 comments on commit f804f56

Please sign in to comment.