[Rt-commit] r13998 - rt/3.8/branches/3.8.0-releng/lib/RT

jesse at bestpractical.com jesse at bestpractical.com
Fri Jul 11 11:10:48 EDT 2008


Author: jesse
Date: Fri Jul 11 11:10:48 2008
New Revision: 13998

Modified:
   rt/3.8/branches/3.8.0-releng/lib/RT/Links_Overlay.pm

Log:
 r39524 at 68-246-144-190 (orig r13928):  falcone | 2008-07-09 16:34:39 -0400
  r35342 at ketch:  falcone | 2008-07-09 16:32:37 -0400
  * RTFM used to allow you to create a Link with a NULL Base or Target
    This is being fixed in RTFM, but previously you could not even view
    and Article with an invalid Link
 


Modified: rt/3.8/branches/3.8.0-releng/lib/RT/Links_Overlay.pm
==============================================================================
--- rt/3.8/branches/3.8.0-releng/lib/RT/Links_Overlay.pm	(original)
+++ rt/3.8/branches/3.8.0-releng/lib/RT/Links_Overlay.pm	Fri Jul 11 11:10:48 2008
@@ -153,6 +153,10 @@
     my $Link = $self->SUPER::Next();
     return $Link unless $Link && ref $Link;
 
+    # skip very invalid Link records
+    unless ($Link->Target && $Link->Base) {
+        return $self->Next;
+    }
     # Skip links to local objects thast are deleted
     if ( $Link->TargetURI->IsLocal and UNIVERSAL::isa($Link->TargetObj,"RT::Ticket")
              and $Link->TargetObj->__Value('status') eq "deleted") {


More information about the Rt-commit mailing list