From 237fca4402f854f37073334d3e8df96c5b121520 Mon Sep 17 00:00:00 2001 From: Jonathan Druart Date: Tue, 8 Feb 2022 17:35:27 +0100 Subject: [PATCH] Bug 29570: Simplify for loop Signed-off-by: Jonathan Druart Signed-off-by: Tomas Cohen Arazi Signed-off-by: Kyle M Hall (cherry picked from commit dbf8c63cdd3eccc0490e014f46fe9d21646cca67) Signed-off-by: Andrew Fuerste-Henry --- Koha/REST/V1/Acquisitions/Orders.pm | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/Koha/REST/V1/Acquisitions/Orders.pm b/Koha/REST/V1/Acquisitions/Orders.pm index a1436f59e1..abc9cac09d 100644 --- a/Koha/REST/V1/Acquisitions/Orders.pm +++ b/Koha/REST/V1/Acquisitions/Orders.pm @@ -79,9 +79,9 @@ sub list { if ( exists $reserved_params->{_order_by} ) { # _order_by passed, fix if required - for ( my $i = 0; $i < scalar @{$reserved_params->{_order_by}}; $i++ ) { - $reserved_params->{_order_by}->[$i] =~ s|biblio\.|biblio\.biblioitem\.|g - if $reserved_params->{_order_by}->[$i] =~ m/.*(isbn|ean|publisher).*/; + for my $p ( @{$reserved_params->{_order_by}} ) { + $p =~ s|biblio\.|biblio\.biblioitem\.|g + if $p =~ m/.*(isbn|ean|publisher).*/; } } -- 2.39.5