diff options
| author | ivan <ivan> | 2008-03-13 09:15:00 +0000 | 
|---|---|---|
| committer | ivan <ivan> | 2008-03-13 09:15:00 +0000 | 
| commit | cb478867d443ca7b151d9723d61254d1acda9264 (patch) | |
| tree | 56966af91edc9ec2055d241b207f27007e5b3680 /FS | |
| parent | 63a101757552ee54c300317c2e9ae87f5fb396ba (diff) | |
infinite loop protection
Diffstat (limited to 'FS')
| -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 | 
