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: wainuiwitikapark <wainuiwitikapark@catalyst.net.nz>
(cherry picked from commit e1f52ff212)
Signed-off-by: Frédéric Demians <f.demians@tamil.fr>
This commit is contained in:
Tomas Cohen Arazi 2024-07-08 17:30:01 -03:00 committed by Frédéric Demians
parent 5870fd9612
commit 05ee5d6ef6
1 changed files with 1 additions and 1 deletions

View File

@ -548,7 +548,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);