From 1510482bbf061dfb0439862959455df28feeab0a Mon Sep 17 00:00:00 2001 From: Tomas Cohen Arazi Date: Mon, 8 Jul 2024 17:30:01 -0300 Subject: [PATCH] [23.11.x] 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 ddbb75e3428..f45adde4af9 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.45.2