From 288a0f4262936c56dbe9ea8ed09d012bf3d74672 Mon Sep 17 00:00:00 2001 From: =?utf8?q?Sven=20Sch=C3=B6ling?= Date: Mon, 10 Jul 2017 12:54:44 +0200 Subject: [PATCH] item_selected: kein inplace modify auf form in einer schleife. MIME-Version: 1.0 Content-Type: text/plain; charset=utf8 Content-Transfer-Encoding: 8bit Potentielle Ursache für den bizarre copy of ARRAY bug. --- bin/mozilla/io.pl | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) diff --git a/bin/mozilla/io.pl b/bin/mozilla/io.pl index bbbf5f318..671cbb04f 100644 --- a/bin/mozilla/io.pl +++ b/bin/mozilla/io.pl @@ -560,13 +560,15 @@ sub item_selected { my $row = $curr_row; if ($myconfig{item_multiselect}) { - foreach (grep(/^select_qty_/, keys(%{ $form }))) { + my %multi_items; + for (keys %$form) { next unless $form->{$_}; - $_ =~ /^select_qty_(\d+)/; - $form->{"id_${row}"} = $1; - $form->{"qty_${row}"} = $form->{$_}; + next unless /^select_qty_(\d+)/; + $multi_items{"id_${row}"} = $1; + $multi_items{"qty_${row}"} = $form->{$_}; $row++; } + $form->{$_} = $multi_items{$_} for keys %multi_items; } else { $form->{"id_${row}"} = delete($form->{select_item_id}) || croak 'Missing item selection ID'; $row++; -- 2.20.1