From dbf8c63cdd3eccc0490e014f46fe9d21646cca67 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 --- 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 03851a6d96..f46f4cfd7f 100644 --- a/Koha/REST/V1/Acquisitions/Orders.pm +++ b/Koha/REST/V1/Acquisitions/Orders.pm @@ -77,9 +77,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