From e1f52ff212f65d174604c6d180ab40ed16330883 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: wainuiwitikapark --- 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 e058bf9515..5718ec8ac2 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