Without this patch we get
Use of uninitialized value $3 in concatenation (.) or string at /kohadevbox/koha/Koha/SearchEngine/Elasticsearch/QueryBuilder.pm line 943.
This converts the | OR operator to two different regexes so that the
capture group variables will be defined in every case.
Signed-off-by: Joonas Kylmälä <joonas.kylmala@helsinki.fi>
Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
}
# Remove unquoted colons that have whitespace on either side of them
- $term =~ s/((:+)(\s+)|(\s+)(:+))$lookahead/$3$4/g;
+ $term =~ s/(:+)(\s+)$lookahead/$2/g;
+ $term =~ s/(\s+)(:+)$lookahead/$1/g;
$term = $self->_query_regex_escape_process($term);