From 117d826bf3b10c98a903fd0ed032fc9cb888741d Mon Sep 17 00:00:00 2001 From: Nick Clemens Date: Wed, 24 Nov 2021 16:05:23 +0000 Subject: [PATCH] Bug 28832: (follow-up) Don't remove false values, only empty strings Signed-off-by: Martin Renvoize Signed-off-by: Andrew Fuerste-Henry --- tools/batchMod.pl | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/tools/batchMod.pl b/tools/batchMod.pl index e21b0e8299..bf415c2ea7 100755 --- a/tools/batchMod.pl +++ b/tools/batchMod.pl @@ -123,13 +123,14 @@ if ($op eq "action") { # Clear the fields we are not editing, leave fields we are blanking foreach( my $i = 0; $i < scalar @values; $i++ ){ - unless( $values[$i] || $searches[$i] || grep { $subfields[$i] } @disabled ){ + unless( $values[$i] ne q{} || $searches[$i] ne q{} || grep { $subfields[$i] } @disabled ){ splice(@values,$i,1); splice(@subfields,$i,1); splice(@tags,$i,1); splice(@searches,$i,1); splice(@replaces,$i,1); splice(@modifiers,$i,1); + $i--; # We made the arrays smaller - go back a step in interation } } -- 2.39.5