diff options
| author | Mark Wells <mark@freeside.biz> | 2013-09-27 13:08:05 -0700 |
|---|---|---|
| committer | Mark Wells <mark@freeside.biz> | 2013-09-27 13:08:05 -0700 |
| commit | 0792a884aea4a30b1c227875a88270928602ff00 (patch) | |
| tree | 19ffd009929f7d17c9d5f1c46915d18ff934c53b /rt/share/html | |
| parent | c0cd3e464e443a2d42d7f519ba01685087c6b423 (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; |
