This was due to the use of an OR which seems to have caused the
param method to be called in a scalar context thus returning only
the first of multiple repeated cgi params.
This patch retains the intent of the OR by replacing it with a
conditional.
Signed-off-by: Koustubha Kale <kmkale@anantcorp.com>
Signed-off-by: Chris Cormack <chrisc@catalyst.net.nz>
my $op = $cgi->param('op') || 'edit';
my $batch_id = $cgi->param('element_id') || $cgi->param('batch_id') || undef;
my @label_ids = $cgi->param('label_id') if $cgi->param('label_id');
-my @item_numbers = $cgi->param('item_number') || ();
+my @item_numbers = $cgi->param('item_number') if $cgi->param('item_number');
my $barcode = $cgi->param('barcode') if $cgi->param('barcode');
my $branch_code = get_branch_code_from_name($template->param('LoginBranchname'));