From f89baea0626d00511ead2f7b126c93ddd4e55b27 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 --- 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 03851a6d96b..f46f4cfd7f4 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.25.1