Signed-off-by: Francois Gouget fgouget@codeweavers.com --- testbot/lib/ObjectModel/CGI/CollectionBlock.pm | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-)
diff --git a/testbot/lib/ObjectModel/CGI/CollectionBlock.pm b/testbot/lib/ObjectModel/CGI/CollectionBlock.pm index 336c7cd05..e8156a1bf 100644 --- a/testbot/lib/ObjectModel/CGI/CollectionBlock.pm +++ b/testbot/lib/ObjectModel/CGI/CollectionBlock.pm @@ -243,7 +243,7 @@ sub GetDetailsLink($$) my ($MasterColNames, $MasterColValues) = $Row->{Item}->GetMasterCols(); if (defined $MasterColNames) { - foreach my $ColIndex (0 .. @$MasterColNames - 1) + foreach my $ColIndex (0..$#{$MasterColNames}) { $Row->{DetailsLink} .= "&". $MasterColNames->[$ColIndex] ."=". uri_escape($MasterColValues->[$ColIndex]); @@ -385,7 +385,7 @@ sub GenerateFormStart($) my ($MasterColNames, $MasterColValues) = $self->{Collection}->GetMasterCols(); if (defined($MasterColNames)) { - foreach my $ColIndex (0..scalar @$MasterColNames - 1) + foreach my $ColIndex (0..$#{$MasterColNames}) { print "<div><input type='hidden' name='", $MasterColNames->[$ColIndex], "' value='", $self->escapeHTML($MasterColValues->[$ColIndex]), @@ -684,7 +684,7 @@ sub OnAction($$) my ($MasterColNames, $MasterColValues) = $self->{Collection}->GetMasterCols(); if (defined($MasterColNames)) { - foreach my $ColIndex (0 .. @$MasterColNames - 1) + foreach my $ColIndex (0..$#{$MasterColNames}) { $Target .= ($ColIndex == 0 ? "?" : "&") . $MasterColNames->[$ColIndex] . "=" . uri_escape($MasterColValues->[$ColIndex]);