Skip to content

Commit daeb93a

Browse files
author
Sebastian Helzle
authored
Merge pull request #2 from daniellienert/bugfix/use-array-values
BUGFIX: Use array-values to avoid elasticsearch indexing errors
2 parents 52436ec + bff3ef7 commit daeb93a

1 file changed

Lines changed: 2 additions & 1 deletion

File tree

Classes/EelHelper/SuggestionIndexHelper.php

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -44,7 +44,8 @@ public function buildConfig($input, array $payload = [], $weight = 1)
4444
*/
4545
protected function prepareInput($input)
4646
{
47-
return array_filter(explode(' ', preg_replace("/[^[:alnum:][:space:]]/u", ' ', strip_tags($input))));
47+
$input = preg_replace( "/\r|\n/", '', $input);
48+
return array_values(array_filter(explode(' ', preg_replace("/[^[:alnum:][:space:]]/u", ' ', strip_tags($input)))));
4849
}
4950

5051
/**

0 commit comments

Comments
 (0)