protect call to set_usage
authorjeff <jeff>
Tue, 29 Jun 2010 01:01:59 +0000 (01:01 +0000)
committerjeff <jeff>
Tue, 29 Jun 2010 01:01:59 +0000 (01:01 +0000)
httemplate/edit/process/svc_acct.cgi

index 0d2c007..0b272b5 100755 (executable)
@@ -70,6 +70,7 @@ if ( $svcnum ) {
                grep { $new->$_ }
                qw( seconds upbytes downbytes totalbytes );
 
+    $error ||= "invalid $_" foreach grep { $hash{$_} !~ /^\d+$/ } keys %hash;
     $error ||= $new->set_usage(\%hash);  #unoverlimit and trigger radius changes
     last;                                #once is enough
   }