Bug 18374: (QA follow-up) Remove warning in Elasticsearch/Search.pm
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io> Signed-off-by: Julian Maurice <julian.maurice@biblibre.com> Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
This commit is contained in:
parent
4c4d982ae4
commit
cfa1aac955
|
|
@ -148,8 +148,10 @@ sub search_compat {
|
|||
$branches, $query_type, $scan
|
||||
) = @_;
|
||||
my %options;
|
||||
if ( !defined $offset or $offset < 0 ) {
|
||||
$offset = 0;
|
||||
}
|
||||
$options{offset} = $offset;
|
||||
$offset = 0 if $offset < 0;
|
||||
$options{expanded_facet} = $expanded_facet;
|
||||
my $results = $self->search($query, undef, $results_per_page, %options);
|
||||
|
||||
|
|
|
|||
Loading…
Reference in New Issue