avoid error when there is no payment history, #19698
[freeside.git] / httemplate / view / cust_main / payment_history.html
index 235b513..915be49 100644 (file)
@@ -536,7 +536,7 @@ foreach my $item (@history) {
   }
   $i++;
 }
-if ( $history[-1]->{'hide'} ) {
+if ( @history and $history[-1]->{'hide'} ) {
   # then everything is hidden
   $history[-1]->{'balance_forward'} = 1;
 }