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: Katrin Fischer <katrin.fischer@bsz-bw.de>
This commit is contained in:
Tomás Cohen Arazi 2024-07-08 17:30:01 -03:00 committed by Katrin Fischer
parent c77c44be6d
commit e77db213a5
Signed by: kfischer
GPG key ID: 0EF6E2C03357A834

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);