address root cause of rt/rt links and remove the workarounds, RT#9280
[freeside.git] / htetc / handler.pl
index af7ac7d..eb9e67e 100644 (file)
@@ -57,16 +57,17 @@ sub handler
 
     if ( $r->filename =~ /\/rt\// ) { #RT
 
-      $ah->interp($rt_interp);
+      # We don't need to handle non-text, non-xml items
+      return -1 if defined( $r->content_type )
+                && $r->content_type !~ m!(^text/|\bxml\b)!io;
+
 
       local $SIG{__WARN__};
       local $SIG{__DIE__};
 
       RT::Init();
 
-      # We don't need to handle non-text, non-xml items
-      return -1 if defined( $r->content_type )
-                && $r->content_type !~ m!(^text/|\bxml\b)!io;
+      $ah->interp($rt_interp);
 
     } else {
 
@@ -77,7 +78,7 @@ sub handler
 
       #we don't want the RT error handlers under FS
       {
-        local $^W = 0;
+        no warnings 'uninitialized';
         undef($SIG{__WARN__}) if defined($SIG{__WARN__});
         undef($SIG{__DIE__})  if defined($SIG{__DIE__} );
       }