diff options
author | ivan <ivan> | 2008-03-13 09:14:58 +0000 |
---|---|---|
committer | ivan <ivan> | 2008-03-13 09:14:58 +0000 |
commit | 63065c617f83c9da147bf84a368b1d6886d16bf1 (patch) | |
tree | 24c657784811ef66771f05c2a2672146cef3adc8 /FS/FS/cust_pay.pm | |
parent | 188c20600560139fc40811c6538a18109c050f95 (diff) |
infinite loop protection
Diffstat (limited to 'FS/FS/cust_pay.pm')
-rw-r--r-- | FS/FS/cust_pay.pm | 15 |
1 files changed, 8 insertions, 7 deletions
diff --git a/FS/FS/cust_pay.pm b/FS/FS/cust_pay.pm index de14610d6..0507276f4 100644 --- a/FS/FS/cust_pay.pm +++ b/FS/FS/cust_pay.pm @@ -687,6 +687,7 @@ sub _upgrade_data { #class method my $count = 0; my $lastprog = 0; + my %seen = (); while (1) { my $cust_pay = qsearchs( { @@ -698,6 +699,8 @@ sub _upgrade_data { #class method return unless $cust_pay; + next if $seen{$cust_pay->paynum}++; + my $h_cust_pay = $cust_pay->h_search('insert'); if ( $h_cust_pay ) { $cust_pay->otaker($h_cust_pay->history_user); @@ -708,13 +711,11 @@ sub _upgrade_data { #class method delete $FS::payby::hash{'COMP'}->{cust_pay}; #quelle kludge my $error = $cust_pay->replace; - #infinite... - #if ( $error ) { - # warn " *** WARNING: Error updaating order taker for payment paynum". - # $cust_pay->paynun. ": $error\n"; - # next; - #} - die $error if $error; + if ( $error ) { + warn " *** WARNING: Error updaating order taker for payment paynum". + $cust_pay->paynun. ": $error\n"; + next; + } $FS::payby::hash{'COMP'}->{cust_pay} = ''; #restore it |