quiet warnings about CGI::param in list context master github/master
authorIvan Kohler <ivan@freeside.biz>
Wed, 18 Aug 2021 18:11:29 +0000 (11:11 -0700)
committerIvan Kohler <ivan@freeside.biz>
Wed, 18 Aug 2021 18:11:29 +0000 (11:11 -0700)
httemplate/edit/process/cust_main.cgi
httemplate/edit/process/elements/ApplicationCommon.html
httemplate/misc/xmlhttp-cust_main-display_recurring.html
httemplate/search/cust_event.html
httemplate/search/cust_main.html
httemplate/search/log.html

index baacd5e..18017fd 100755 (executable)
@@ -44,7 +44,7 @@ my $error = '';
 
 $cgi->param('tax','') unless defined $cgi->param('tax');
 
-$cgi->param('refnum', (split(/:/, ($cgi->param('refnum'))[0] ))[0] );
+$cgi->param('refnum', (split(/:/, ($cgi->multi_param('refnum'))[0] ))[0] );
 
 #my @invoicing_list = split( /\s*\,\s*/, $cgi->param('invoicing_list') );
 #push @invoicing_list, 'POST' if $cgi->param('invoicing_list_POST');
index b7501d4..5007319 100644 (file)
@@ -55,8 +55,12 @@ my $cust_main = qsearchs('cust_main', { 'custnum' => $src->custnum } )
 my $custnum = $cust_main->custnum;
 
 my @subnames = grep { /.+/ } map { /^subnum(\d+)$/ ? $1 : '' } $cgi->param;
-my @subitems = map { [ $cgi->param("subnum$_"), $cgi->param("subamount$_"), $cgi->param("taxXlocationnum$_") ] }
-               @subnames;
+my @subitems = map { [ scalar($cgi->param("subnum$_")),
+                       scalar($cgi->param("subamount$_")),
+                       scalar($cgi->param("taxXlocationnum$_"))
+                     ]
+                   }
+                 @subnames;
 { local $^W = 0; @subitems = grep { $_->[1] + 0 } @subitems; }
 
 my %options = ();
index dd9ed3b..6c9cf69 100644 (file)
@@ -1,7 +1,7 @@
 <% encode_json($return) %>\
 <%init>
 
-my %arg = $cgi->param('arg');
+my %arg = $cgi->multi_param('arg');
 my $custnum = delete($arg{'custnum'});
 
 my $error;
index 8bbd1af..56bf767 100644 (file)
@@ -163,7 +163,7 @@ die "access denied"
               || $cgi->param('pkgnum')  =~ /^(\d+)$/
             );
 
-my @statuses = $cgi->param('event_status');
+my @statuses = $cgi->multi_param('event_status');
 my $title = 'Billing events';
 if ( $statuses[0] eq 'failed' and !defined($statuses[1]) ) {
   # tweak the title if we're showing only failed events
index 46e35da..8ef068f 100755 (executable)
@@ -70,7 +70,7 @@ for my $param ( @scalars ) {
 
 #lists
 for my $param (qw( classnum refnum pkg_classnum )) {
-  $search_hash{$param} = [ $cgi->param($param) ];
+  $search_hash{$param} = [ $cgi->multi_param($param) ];
 }
 
 my $params = $cgi->Vars;
index 9be0b7d..96a6f5b 100644 (file)
@@ -216,7 +216,9 @@ $cgi->param('max_level', 5) unless defined($cgi->param('max_level'));
 
 my %search = ();
 $search{'date'} = [ FS::UI::Web::parse_beginning_ending($cgi) ];
-$search{'level'} = [ $cgi->param('min_level'), $cgi->param('max_level') ];
+$search{'level'} = [ scalar($cgi->param('min_level')),
+                     scalar($cgi->param('max_level'))
+                   ];
 foreach my $param (qw(agentnum context context_height tablename tablenum custnum message)) {
   if ( $cgi->param($param) ) {
     $search{$param} = $cgi->param($param);