diff options
| author | Mark Wells <mark@freeside.biz> | 2013-09-27 13:08:19 -0700 |
|---|---|---|
| committer | Mark Wells <mark@freeside.biz> | 2013-09-27 13:08:19 -0700 |
| commit | e171647bc34d730d982c0e08d9731bbeb414be31 (patch) | |
| tree | 36d13d2cf54b54c617e9c5457ec24df132337a86 /rt/share/html | |
| parent | d1953d60d032b0b3066704c20ff75bf8585cd32e (diff) | |
prevent nonexistent customer links from breaking ticket display, #25063
Diffstat (limited to 'rt/share/html')
| -rw-r--r-- | rt/share/html/Ticket/Elements/Customers | 10 |
1 files changed, 6 insertions, 4 deletions
diff --git a/rt/share/html/Ticket/Elements/Customers b/rt/share/html/Ticket/Elements/Customers index d90ef1c44..fed678380 100644 --- a/rt/share/html/Ticket/Elements/Customers +++ b/rt/share/html/Ticket/Elements/Customers @@ -43,10 +43,12 @@ while (my $link = $customers->Next) { } elsif ( $uri =~ /cust_svc\/(\d+)/ ) { my $svc = $link->TargetURI->Resolver; my $cust = $svc->CustomerResolver; - my $custnum = $cust->{fspkey}; - $cust_main{$custnum} ||= $cust; - $cust_svc{$custnum} ||= []; - push @{$cust_svc{$custnum}}, $svc; + if ( $cust ) { + my $custnum = $cust->{fspkey}; + $cust_main{$custnum} ||= $cust if $cust; + $cust_svc{$custnum} ||= []; + push @{$cust_svc{$custnum}}, $svc if $svc; + } } } @custnums = sort { $a <=> $b } keys %cust_main; |
