From c801ea3c69e6d6db524f568372a8685622ee90cf Mon Sep 17 00:00:00 2001 From: Marcel de Rooy Date: Fri, 10 Jan 2020 07:54:33 +0000 Subject: [PATCH] Bug 24367: Resolve warn Argument available is not numeric in delete Argument "available" isn't numeric in delete at /usr/share/koha/C4/Search.pm line 1480. The construction delete array[string] simply does not work. Signed-off-by: Martin Renvoize --- C4/Search.pm | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/C4/Search.pm b/C4/Search.pm index dc620ba641..4ca9e01427 100644 --- a/C4/Search.pm +++ b/C4/Search.pm @@ -1477,7 +1477,7 @@ sub buildQuery { if ( @limits ) { if ( grep { $_ eq 'available' } @limits ) { $q .= q| and ( (allrecords,AlwaysMatches='') and (not-onloan-count,st-numeric >= 1) and (lost,st-numeric=0) )|; - delete $limits['available']; + @limits = grep {!/^available$/} @limits; } $q .= ' and '.join(' and ', @limits) if @limits; } -- 2.39.5