From 3708e4f4439886f23e672be013ea14f9913398f3 Mon Sep 17 00:00:00 2001 From: Tomas Cohen Arazi Date: Mon, 8 Jul 2024 17:30:01 -0300 Subject: [PATCH] Bug 37018: Silence useless warning Signed-off-by: Tomas Cohen Arazi Signed-off-by: Martin Renvoize Signed-off-by: Jonathan Druart --- Koha/REST/Plugin/Query.pm | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Koha/REST/Plugin/Query.pm b/Koha/REST/Plugin/Query.pm index ddbb75e342..f45adde4af 100644 --- a/Koha/REST/Plugin/Query.pm +++ b/Koha/REST/Plugin/Query.pm @@ -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); -- 2.39.5