From e77db213a55f229b5c5e9179ef15deb8de9ebc13 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 Signed-off-by: Katrin Fischer --- 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 0c1edcfc4d..b492866770 100644 --- a/Koha/REST/Plugin/Query.pm +++ b/Koha/REST/Plugin/Query.pm @@ -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); -- 2.39.5