X-Git-Url: http://git.freeside.biz/gitweb/?a=blobdiff_plain;f=htetc%2Fhandler.pl;h=eb9e67ee5f47d39ec8f164ba51a390a2544e6af4;hb=fa7e044b2829a4e913c8094c7e8c59146a055efc;hp=4ce6586857cc9434b0e79159832edcd4c826a8e8;hpb=eda086d0c5c4829e3f29dea030d2b0efb6fecbb0;p=freeside.git diff --git a/htetc/handler.pl b/htetc/handler.pl index 4ce658685..eb9e67ee5 100644 --- a/htetc/handler.pl +++ b/htetc/handler.pl @@ -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 { @@ -76,8 +77,11 @@ sub handler RT::Init() if $RT::VERSION; #for lack of something else #we don't want the RT error handlers under FS - undef $SIG{__WARN__}; - undef $SIG{__DIE__}; + { + no warnings 'uninitialized'; + undef($SIG{__WARN__}) if defined($SIG{__WARN__}); + undef($SIG{__DIE__}) if defined($SIG{__DIE__} ); + } $ah->interp($fs_interp);