Bug 37018: Silence useless warning

Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>

Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
This commit is contained in:
Tomas Cohen Arazi 2024-07-08 17:30:01 -03:00 committed by Lucas Gass
parent 21fd44f505
commit b81b388db3
1 changed files with 1 additions and 1 deletions

View File

@ -700,7 +700,7 @@ sub _validate_query {
# Top-level OR combination or nested AND combination
for my $element (@$query) {
if ( ref $element eq 'ARRAY' && $element->[0] eq '-and' ) {
if ( ref $element eq 'ARRAY' && scalar @{$element} && $element->[0] eq '-and' ) {
_validate_query( $element->[1] );
} else {
_validate_query($element);